93#define DEBUGLOCK DebugLibSemaphore.Wait()
94#define DEBUGUNLOCK DebugLibSemaphore.Post()
97#define DEBUGLOCK DebugLibSemaphore.lock()
98#define DEBUGUNLOCK DebugLibSemaphore.unlock()
106 now -= TimezoneOffset(); \
107 now.FormatTime(timebuf, "mm/dd/yy hh:mm:ss"); \
109 if (MsgManager::infoStream()) \
110 (*(MsgManager::infoStream())) << "INF " << timebuf << " [" << \
111 __FILE__ << " " << __LINE__ << "] " << X << endl; \
120 now -= TimezoneOffset(); \
121 now.FormatTime(timebuf, "mm/dd/yy hh:mm:ss"); \
123 if (MsgManager::warnStream()) \
124 (*(MsgManager::warnStream())) << "WRN " << timebuf << " [" << \
125 __FILE__ << " " << __LINE__ << "] " << X << endl; \
134 now -= TimezoneOffset(); \
135 now.FormatTime(timebuf, "mm/dd/yy hh:mm:ss"); \
137 if (MsgManager::errorStream()) \
138 (*(MsgManager::errorStream())) << "ERR " << timebuf << " [" << \
139 __FILE__ << " " << __LINE__ << "] " << X << endl; \
148 if (MsgManager::infoStream()) \
149 (*(MsgManager::infoStream())) << X;\
157 if (MsgManager::warnStream()) \
158 (*(MsgManager::warnStream())) << X;\
166 if (MsgManager::errorStream()) \
167 (*(MsgManager::errorStream())) << X;\
179#define DBGSTREAM(X) {}
196 if (MsgManager::debugStream()) \
197 (*(MsgManager::debugStream())) << __FILE__ << "[" << __LINE__ << \
198 "]: " << ##V << " = " << V << endl; \
200 __s << __FILE__ << "[" << __LINE__ << \
201 "]: " << ##V << " = " << V << '\n' << '\0';\
202 OutputDebugString(__s.str());\
210 if (MsgManager::debugStream()) \
211 (*(MsgManager::debugStream())) << "DBG [" << __FILE__ << \
212 " " << __LINE__ << "] " << X << endl;\
214 __s << "DBG [" << __FILE__ << \
215 " " << __LINE__ << "] " << X << '\n' << '\0';\
216 OutputDebugString(__s.str());\
224 if (MsgManager::debugStream()) \
225 (*(MsgManager::debugStream())) << X;\
228 OutputDebugString(__s.str());\
236 if (MsgManager::debugStream()) \
237 (*(DebugManager::debugStream())) << __FILE__ << "[" << __LINE__ << \
238 "]: " << ##X << endl; X \
240 __s << __FILE__ << "[" << __LINE__ << \
241 "]: " << ##X << '\n' << '\0';\
242 OutputDebugString(__s.str());\
252 if (MsgManager::debugStream()) \
253 (*(MsgManager::debugStream())) << __FILE__ << "[" << __LINE__ << \
254 "]: " << ##V << " = " << V << endl; \
262 if (MsgManager::debugStream()) \
263 (*(MsgManager::debugStream())) << "DBG [" << __FILE__ << \
264 " " << __LINE__ << "] " << X << endl;\
272 if (MsgManager::debugStream()) \
273 (*(MsgManager::debugStream())) << X;\
281 if (MsgManager::debugStream()) \
282 (*(DebugManager::debugStream())) << __FILE__ << "[" << __LINE__ << \
283 "]: " << ##X << endl; X \
static void enableInfo(int flag)
static ostream * errorStream(void)
static ostream * warnStream(void)
static int setDebugStream(OutputDevice *device)
static void enableDebug(int flag)
static void enableWarn(int flag)
static int ReplaceAllStreams(FileD *output_device, IN char *device_filename, IN char *copy_filename)
static int setErrorStream(OutputDevice *device)
static int setWarnStream(OutputDevice *device)
static ostream * debugStream(void)
static int setAllStreams(OutputDevice *device)
static int setInfoStream(OutputDevice *device)
static void enableError(int flag)
static ostream * infoStream(void)
OutputDevice * output_device