1 #ifndef _utl_MessageLogger_h_
2 #define _utl_MessageLogger_h_
106 explicit operator bool()
const {
return false; }
137 {
return Message(*
this, message, level, trailEOL); }
143 Log(
const T& message,
unsigned int l)
194 ApplyConfigurationOn(
S& stream)
201 stream << std::setprecision(
fNPrecDigits) << std::fixed;
void SetLevel(unsigned int l)
Set a new level.
Message operator()(const T &message, unsigned int level, bool trailEOL)
Start of message logging.
void Log(const T &message, unsigned int l)
Actual logging function against the given stream.
unsigned int fFlushPeriod
Flush the stream every this number of times of calls to Log (zero means no flush at all)...
unsigned int fFlushCounter
Current flush count.
MessageLogger(std::ostream &os, unsigned int l)
Construct a logger to handle the messages.
std::ostream & fStream
Output stream.
void SetNPrecDigits(unsigned int n)
Set a new number of digits.
unsigned int fNPrecDigits
void SetFlushPeriod(unsigned int p)
Set a new period.
unsigned int GetLevel() const
Return the current level set.
Message & operator()(const T &t)
Append a value separated from previous values.
unsigned int fMessageLevel
unsigned int fLevel
Threshold level for message output.
std::ostream & ResolveStream()
std::ios_base::fmtflags fPrevFlag
unsigned int GetFlushPeriod() const
Return the current period.
Message(MessageLogger &logger, const T &t, unsigned int l, bool e)
Construct a message with the initial value and the given level.
Handle diagnosis messages output.
unsigned int GetNPrecDigits() const
Return the number of digits for floating-point numbers.
~Message()
On destruction line termination is appended.
std::streamsize fPrevPrec