sqwarmed/sdk_src/game/server/hl2/hl2_eventlog.cpp

62 lines
1.3 KiB
C++
Raw Normal View History

2024-08-29 19:18:30 -04:00
//========= Copyright <20> 1996-2005, 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
//-----------------------------------------------------------------------------
CEventLog* GameLogSystem()
{
return &s_HL2EventLog;
}