source-engine/game/server/hl2/hl2_eventlog.cpp
FluorescentCIAAfricanAmerican 3bf9df6b27 1
2020-04-22 12:56:21 -04:00

62 lines
1.2 KiB
C++

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#include "cbase.h"
#include "../EventLog.h"
#include "KeyValues.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
class CHL2EventLog : public CEventLog
{
private:
typedef CEventLog BaseClass;
public:
virtual char const *Name() { return "CHL2EventLog"; }
virtual ~CHL2EventLog() {};
public:
bool PrintEvent( IGameEvent * event ) // override virtual function
{
if ( BaseClass::PrintEvent( event ) )
{
return true;
}
if ( Q_strcmp(event->GetName(), "hl2_") == 0 )
{
return PrintHL2Event( event );
}
return false;
}
protected:
bool PrintHL2Event( IGameEvent * event ) // print Mod specific logs
{
// const char * name = event->GetName() + Q_strlen("hl2_"); // remove prefix
return false;
}
};
static CHL2EventLog s_HL2EventLog;
//-----------------------------------------------------------------------------
// Singleton access
//-----------------------------------------------------------------------------
IGameSystem* GameLogSystem()
{
return &s_HL2EventLog;
}