25 G::Log::Log( Severity severity ,
const char * file ,
int line ) :
26 m_severity(severity) ,
46 return output !=
nullptr && output->
at(s) ;
52 if( output ==
nullptr )
59 bool a = output->
enable(
true) ;
bool enable(bool enabled=true)
Enables or disables output. Returns the previous setting.
static bool at(Severity)
Returns true if G::LogOutput::output() would log at the given level.
static LogOutput * instance()
Returns a pointer to the controlling LogOutput object.
Log(Severity, const char *file, int line)
Constructor.
static void output(G::Log::Severity, const char *file, int line, const std::string &)
Generates output if there is an existing LogOutput object which is enabled.
bool at(G::Log::Severity) const
Returns true if output() generates output at the given severity level.
Controls and implements low-level logging output, as used by the Log interface.
std::ostream & operator<<(const char *s)
Streams 's' and then returns a stream for streaming more stuff into.
~Log()
Destructor. Writes the accumulated string to the log output.