A class for doing iostream-based logging.
More...
#include <glog.h>
|
enum class | Severity {
Debug
, InfoMoreVerbose
, InfoVerbose
, InfoSummary
,
Warning
, Error
, Assertion
} |
|
|
| Log (Severity, const char *file, int line) noexcept |
| Constructor. More...
|
|
| ~Log () |
| Destructor. Writes the accumulated string to the log output. More...
|
|
LogStream & | operator<< (const char *s) noexcept |
| Streams 's' and then returns a stream for streaming more stuff into. More...
|
|
LogStream & | operator<< (const std::string &s) noexcept |
| Streams 's' and then returns a stream for streaming more stuff into. More...
|
|
LogStream & | operator<< (const format &f) |
| Streams 'f' and then returns a stream for streaming more stuff into. More...
|
|
| Log (const Log &)=delete |
|
| Log (Log &&)=delete |
|
Log & | operator= (const Log &)=delete |
|
Log & | operator= (Log &&)=delete |
|
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:
G::Log(G::Log::Severity::InfoSummary,__FILE__,__LINE__) << a << b ;
A class for doing iostream-based logging.
or
or
- See also
- G::LogOutput
Definition at line 54 of file glog.h.
◆ Severity
enum class G::Log::Severity |
|
strong |
◆ Log()
G::Log::Log |
( |
Severity |
severity, |
|
|
const char * |
file, |
|
|
int |
line |
|
) |
| |
|
noexcept |
Constructor.
Definition at line 26 of file glog.cpp.
◆ ~Log()
Destructor. Writes the accumulated string to the log output.
Definition at line 35 of file glog.cpp.
◆ at()
bool G::Log::at |
( |
Severity |
s | ) |
|
|
staticnoexcept |
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.
Definition at line 41 of file glog.cpp.
◆ atDebug()
Returns at(Severity::Debug).
Definition at line 113 of file glog.h.
◆ atMoreVerbose()
bool G::Log::atMoreVerbose |
( |
| ) |
|
|
inlinestaticnoexcept |
Returns at(Severity::InfoMoreVerbose).
Definition at line 123 of file glog.h.
◆ atVerbose()
bool G::Log::atVerbose |
( |
| ) |
|
|
inlinestaticnoexcept |
Returns at(Severity::InfoVerbose).
Definition at line 118 of file glog.h.
◆ operator<<() [1/3]
Streams 's' and then returns a stream for streaming more stuff into.
Definition at line 50 of file glog.cpp.
◆ operator<<() [2/3]
Streams 'f' and then returns a stream for streaming more stuff into.
Definition at line 66 of file glog.cpp.
◆ operator<<() [3/3]
Streams 's' and then returns a stream for streaming more stuff into.
Definition at line 58 of file glog.cpp.
The documentation for this class was generated from the following files:
- /tmp/SBo/slackrepo.64ZNpN/build_emailrelay/emailrelay-2.5.1/src/glib/glog.h
- /tmp/SBo/slackrepo.64ZNpN/build_emailrelay/emailrelay-2.5.1/src/glib/glog.cpp