rippled
|
A generic endpoint for log messages. More...
Classes | |
class | ScopedStream |
class | Sink |
Abstraction for the underlying message destination. More... | |
class | Stream |
Provide a light-weight way to check active() before string formatting. More... | |
Public Member Functions | |
Journal ()=delete | |
Journal has no default constructor. More... | |
Journal (Sink &sink) | |
Create a journal that writes to the specified sink. More... | |
Sink & | sink () const |
Returns the Sink associated with this Journal. More... | |
Stream | stream (Severity level) const |
Returns a stream for this sink, with the specified severity level. More... | |
bool | active (Severity level) const |
Returns true if any message would be logged at this severity level. More... | |
Stream | trace () const |
Severity stream access functions. More... | |
Stream | debug () const |
Stream | info () const |
Stream | warn () const |
Stream | error () const |
Stream | fatal () const |
Static Public Member Functions | |
static Sink & | getNullSink () |
Returns a Sink which does nothing. More... | |
Private Types | |
using | Severity = severities::Severity |
Private Attributes | |
Sink * | m_sink |
A generic endpoint for log messages.
The Journal has a few simple goals:
To be light-weight and copied by value. To allow logging statements to be left in source code. The logging is controlled at run-time based on a logging threshold.
It is advisable to check Journal::active(level) prior to formatting log text. Doing so sidesteps expensive text formatting when the results will not be sent to the log.
|
private |
|
delete |
Journal has no default constructor.
|
explicit |
|
static |
Returns a Sink which does nothing.
Definition at line 72 of file beast_Journal.cpp.
Sink& beast::Journal::sink | ( | ) | const |
bool beast::Journal::active | ( | Severity | level | ) | const |
Stream beast::Journal::trace | ( | ) | const |