From: Prochnow, C. <pro...@se...> - 2005-05-18 14:55:58
|
Hi List, i've added a Tracing-solution to the core-module. To make use of it simply #include <pclasses/Trace.h> and make use of the two trace-macros. For trace-messages generated inside of a class use: P_TRACE(classname) << "My class trace message"; For global trace-messages use: P_TRACE_GLOBAL() << "My global trace message"; The message is flushed after the stream-operation is complete - eg. after ";". You dont have to use "endl". When compiled with debug enabled (-D_DEBUG) the trace-macros make use of the TraceLog and TraceStream classes. When compiled without debug the trace-macros will use the NullTraceStream class which should be optimized to zero overhead. The TraceLog class is thread-safe. Regards, Christian |