afLog.h
资源名称:AirForce.rar [点击查看]
上传用户:kaiguan
上传日期:2007-10-28
资源大小:1074k
文件大小:1k
源码类别:
其他游戏
开发平台:
Visual C++
- // afLog.h: interface for the afLog class.
- //
- //////////////////////////////////////////////////////////////////////
- #ifndef AF_LOG
- #define AF_LOG
- #pragma once
- class afLog
- {
- public:
- /// init() has to be called before the first log can be saved.
- /**
- * Since most of classes do logging during their initialization,
- * this method has to be called, before any other initialization is done.
- * Therefore calling afLog::init() should be the first call of any other method.
- */
- static void init(const char* nLogFileName);
- /// Logs an info message
- /**
- * Parameters work same as for printf
- */
- static void info(const char *szFormat, ...);
- /// Logs a warning message
- /**
- * Parameters work same as for printf
- */
- static void warning(const char *szFormat, ...);
- /// Logs an error message
- /**
- * Parameters work same as for printf
- */
- static void error(const char *szFormat, ...);
- /// Writes a message to debug output in visual studio
- /**
- * Parameters work same as for printf
- */
- static void trace(const char *szFormat, ...);
- private:
- static char fileName[1024];
- };
- #endif