Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 lines
1.1 KiB

//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#include "cbase.h"
#include "../EventLog.h"
#include "KeyValues.h"
class CSDKEventLog : public CEventLog
{
private:
typedef CEventLog BaseClass;
public:
virtual ~CSDKEventLog() {};
public:
bool PrintEvent( IGameEvent * event ) // override virtual function
{
if ( BaseClass::PrintEvent( event ) )
{
return true;
}
if ( Q_strcmp(event->GetName(), "sdk_") == 0 )
{
return PrintSDKEvent( event );
}
return false;
}
protected:
bool PrintSDKEvent( IGameEvent * event ) // print Mod specific logs
{
//const char * name = event->GetName() + Q_strlen("sdk_"); // remove prefix
return false;
}
};
CSDKEventLog g_SDKEventLog;
//-----------------------------------------------------------------------------
// Singleton access
//-----------------------------------------------------------------------------
IGameSystem* GameLogSystem()
{
return &g_SDKEventLog;
}