25G::Log::Log( Severity severity ,
const char * file ,
int line ) :
26 m_severity(severity) ,
29 m_ostream(
LogOutput::start(m_severity,m_file,m_line))
47 return log_output && log_output->
at( s ) ;
53 return m_ostream << s ;
58 return m_ostream << s ;
Controls and implements low-level logging output, as used by G::Log.
bool at(Log::Severity) const noexcept
Returns true if logging should occur for the given severity level.
static void output(std::ostream &)
Emits the current log line (see start()).
static LogOutput * instance() noexcept
Returns a pointer to the controlling LogOutput object.
~Log()
Destructor. Writes the accumulated string to the log output.
std::ostream & operator<<(const char *s)
Streams 's' and then returns a stream for streaming more stuff into.
Log(Severity, const char *file, int line)
Constructor.
static bool at(Severity)
Returns true if G::LogOutput::output() would log at the given level.