3 * ===============================================================
4 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
5 * ===============================================================
7 * This file is not open source and may not be copied without explicit
8 * written permission of AlliedModders LLC. This file may not be redistributed
9 * in whole or significant part.
10 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
15 #ifndef _INCLUDE_SOURCEMOD_CLOGGER_H_
16 #define _INCLUDE_SOURCEMOD_CLOGGER_H_
18 #include <sh_string.h>
19 #include "sm_globals.h"
21 using namespace SourceHook;
36 class Logger : public SMGlobalClass
39 Logger() : m_Mode(LoggingMode_Daily), m_ErrMapStart(false),
40 m_Active(false), m_DelayedStart(false), m_DailyPrintHdr(false),
44 public: //SMGlobalClass
45 ConfigResult OnSourceModConfigChanged(const char *key,
50 void OnSourceModStartup(bool late);
51 void OnSourceModAllShutdown();
52 void OnSourceModLevelChange(const char *mapName);
54 void InitLogger(LoggingMode mode);
57 void DisableLogging();
58 void LogMessage(const char *msg, ...);
59 void LogError(const char *msg, ...);
60 void LogFatal(const char *msg, ...);
61 void MapChange(const char *mapname);
62 const char *GetLogFileName(LogType type) const;
63 LoggingMode GetLoggingMode() const;
67 void _PrintToGameLog(const char *fmt, va_list ap);
81 extern Logger g_Logger;
83 #endif // _INCLUDE_SOURCEMOD_CLOGGER_H_