OTC_LogStream
.
#include <OTC/debug/logbuf.hh> class OTC_LogBuf : public streambuf {
public:
~OTC_LogBuf();
OTC_LogBuf(char* theBuffer, int theSize);
inline OTC_LogLevel setLevel(OTC_LogLevel theLevel);
int sync();
protected:
streambuf* setbuf(char* theBuffer, int theSize);
int overflow(int c);
int underflow();
};
OTC_LogBuf
is used to used to manage the buffer used by
OTC_LogStream
, to format messages which are to be sent to the
logger. Messages are automatically sent to the logger at the set
priority level, when the stream using this class is flushed,
or the buffer used in this class is filled.
OTC_LogBuf(char* theBuffer, int theSize);
OTC_LogStream
. theBuffer
should be the
buffer into which messages are going to be
formatted. theSize
should be the size of
the buffer you have provided.
inline OTC_LogLevel setLevel(OTC_LogLevel theLevel);
theLevel
.
int sync();
OTC_Logger
, OTC_LogStream