-
-
-// helper macros
-#define LogMessage(fmt, ...) { if (g_bLogEnabled) { wxPrintf(fmt "\n", __VA_ARGS__); fflush(stdout); }}
-#define LogWarning(fmt, ...) { if (g_bLogEnabled) { wxPrintf(fmt "\n", __VA_ARGS__); fflush(stdout); }}
-#define LogError(fmt, ...) { if (g_bLogEnabled) { wxPrintf("ERROR: " fmt "\n", __VA_ARGS__); fflush(stdout); }}
-#define wxPrint(str) { wxPrintf(str); fflush(stdout); }
-
-// enable/disable logging
-extern bool g_bLogEnabled;
-
-class LogNull
-{
-public:
- LogNull() { g_bLogEnabled = false; }
- ~LogNull() { g_bLogEnabled = true; }
-};
-