LDMX Software
|
Our logging formatter. More...
#include <Logger.h>
Public Member Functions | |
Formatter (Formatter const &)=delete | |
delete the copy constructor | |
void | operator= (Formatter const &)=delete |
delete the assignment operator | |
void | operator() (const log::record_view &view, log::formatting_ostream &os) |
format the passed record view into the output stream | |
Static Public Member Functions | |
static Formatter & | get () |
get reference to the current single Formatter | |
static void | set (int n) |
set the event number in the current Formatter | |
Private Attributes | |
int | event_number_ {0} |
Our logging formatter.
We use a singleton formatter so that it can hold the current event index as an attribute and include it within the logs. This is easier than attempting to update the event number in all of the different logging sources floating around ldmx-sw.
|
static |
get reference to the current single Formatter
Definition at line 155 of file Logger.cxx.
Referenced by set().
void framework::logging::Formatter::operator() | ( | const log::record_view & | view, |
log::formatting_ostream & | os | ||
) |
format the passed record view into the output stream
The format is
[ channel ] severity : message
We de-reference the value out of the log into our own type so that we can compare and convert it into a string.
Definition at line 162 of file Logger.cxx.
|
static |
set the event number in the current Formatter
Definition at line 160 of file Logger.cxx.
References get().
Referenced by framework::Process::run().
|
private |