Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #pragma once
00015
00019 namespace kNet
00020 {
00021
00023 typedef unsigned int LogChannel;
00024
00025 namespace
00026 {
00027 const LogChannel LogUser = 1;
00028 const LogChannel LogInfo = 2;
00029 const LogChannel LogError = 4;
00030 const LogChannel LogObjectAlloc = 8;
00031 const LogChannel LogData = 16;
00032 const LogChannel LogVerbose = 32;
00033 const LogChannel LogWaits = 64;
00034 }
00035
00042 void TimeOutputDebugStringVariadic(LogChannel logChannel, const char *filename, int lineNumber, const char *msg, ...);
00043
00045 void TimeOutputDebugString(LogChannel logChannel, const char *filename, int lineNumber, const char *msg);
00046
00049 void SetLogChannels(LogChannel logChannel);
00050
00052 LogChannel GetLogChannels();
00053
00057 void SetLogFile(const char *filename);
00058
00061 void EnableMemoryLeakLoggingAtExit();
00062
00063 }
00064
00066 #define LOGUSER(msg, ...) kNet::TimeOutputDebugStringVariadic(LogUser, __FILE__, __LINE__, msg, ##__VA_ARGS__)
00067
00069 #define LOG(channel, msg, ...) kNet::TimeOutputDebugStringVariadic(channel, __FILE__, __LINE__, msg, ##__VA_ARGS__)