E-MailRelay
|
A class for doing iostream-based logging. More...
#include <glog.h>
Public Types | |
enum class | Severity { s_InfoVerbose , s_InfoSummary , s_Debug , s_Warning , s_Error , s_Assertion } |
Public Member Functions | |
Log (Severity, const char *file, int line) | |
Constructor. More... | |
~Log () | |
Destructor. Writes the accumulated string to the log output. More... | |
std::ostream & | operator<< (const char *s) |
Streams 's' and then returns a stream for streaming more stuff into. More... | |
std::ostream & | operator<< (const std::string &s) |
Streams 's' and then returns a stream for streaming more stuff into. More... | |
Log (const Log &)=delete | |
Log (Log &&)=delete | |
void | operator= (const Log &)=delete |
void | operator= (Log &&)=delete |
Static Public Member Functions | |
static bool | at (Severity) |
Returns true if G::LogOutput::output() would log at the given level. More... | |
static bool | at (Severity, const char *group) |
An overload that adds a logging group name to the test. | |
A class for doing iostream-based logging.
The G_LOG/G_DEBUG/G_WARNING/G_ERROR macros are provided as a convenient way of using this interface.
Usage:
or
G::Log::Log | ( | Severity | severity, |
const char * | file, | ||
int | line | ||
) |
G::Log::~Log | ( | ) |
|
static |
Returns true if G::LogOutput::output() would log at the given level.
This can be used as an optimisation to short-ciruit the stream-out expression evaluation.
std::ostream & G::Log::operator<< | ( | const char * | s | ) |
std::ostream & G::Log::operator<< | ( | const std::string & | s | ) |