#include <genesis/utils/core/logging.hpp>
POD stuct containing the settings for which information is included with each logging message.
The details are activated via accessing the static variable of the Logging class:
Logging::details.level = true;
All active details are prepended to the actual log message and separated by spaces (execpt file and line, they are separated by a colon). Their order is fixed.
A message with all details activates looks like this
0003 2014-10-28 11:40:47 0.001859 0.000103 src/main/main.cc:28 (int main (int argc, char* argv[])) INFO Hello World.
It was the third message being logged in this run of the program, at a date and time, 0.001859 sec after the program started and 0.000103 sec after the last log message. It was called from main.cc line 28 in function main and has LoggingLevel Info.
Definition at line 267 of file logging.hpp.
Public Member Functions | |
LoggingDetails ()=default | |
LoggingDetails (bool v_count, bool v_date, bool v_time, bool v_runtime, bool v_rundiff, bool v_file, bool v_line, bool v_function, bool v_level) | |
Public Attributes | |
bool | count = false |
Include a counter of how many messages have been logged so far. More... | |
bool | date = false |
Include the current date. More... | |
bool | file = false |
Include the filename where the log message was generated. More... | |
bool | function = false |
Include the function name where the log message was generated. More... | |
bool | level = false |
Include the level (e.g. Info, Debug) of the message. More... | |
bool | line = false |
Include the line of the file where the log message was generated. More... | |
bool | rundiff = false |
Include the run time difference to the last log message in sec. More... | |
bool | runtime = false |
Include the current run time of the program in sec. More... | |
bool | time = false |
Include the current time. More... | |
|
default |
|
inline |
Definition at line 271 of file logging.hpp.
bool count = false |
Include a counter of how many messages have been logged so far.
Definition at line 287 of file logging.hpp.
bool date = false |
Include the current date.
Definition at line 290 of file logging.hpp.
bool file = false |
Include the filename where the log message was generated.
Definition at line 308 of file logging.hpp.
bool function = false |
Include the function name where the log message was generated.
This might not be available on certain compilers. In this case, it is empty.
Definition at line 321 of file logging.hpp.
bool level = false |
Include the level (e.g. Info, Debug) of the message.
Definition at line 324 of file logging.hpp.
bool line = false |
Include the line of the file where the log message was generated.
Definition at line 314 of file logging.hpp.
bool rundiff = false |
Include the run time difference to the last log message in sec.
Useful for timing and profiling code sections. Is 0.0 at the first log message.
Definition at line 305 of file logging.hpp.
bool runtime = false |
Include the current run time of the program in sec.
Definition at line 296 of file logging.hpp.
bool time = false |
Include the current time.
Definition at line 293 of file logging.hpp.