A toolkit for working with phylogenetic data.
v0.24.0
LoggingDetails Struct Reference

#include <genesis/utils/core/logging.hpp>

Detailed Description

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 266 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...
 

Constructor & Destructor Documentation

◆ LoggingDetails() [1/2]

LoggingDetails ( )
default

◆ LoggingDetails() [2/2]

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 
)
inline

Definition at line 270 of file logging.hpp.

Member Data Documentation

◆ count

bool count = false

Include a counter of how many messages have been logged so far.

Definition at line 286 of file logging.hpp.

◆ date

bool date = false

Include the current date.

Definition at line 289 of file logging.hpp.

◆ file

bool file = false

Include the filename where the log message was generated.

Definition at line 307 of file logging.hpp.

◆ function

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 320 of file logging.hpp.

◆ level

bool level = false

Include the level (e.g. Info, Debug) of the message.

Definition at line 323 of file logging.hpp.

◆ line

bool line = false

Include the line of the file where the log message was generated.

Definition at line 313 of file logging.hpp.

◆ rundiff

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 304 of file logging.hpp.

◆ runtime

bool runtime = false

Include the current run time of the program in sec.

Definition at line 295 of file logging.hpp.

◆ time

bool time = false

Include the current time.

Definition at line 292 of file logging.hpp.


The documentation for this struct was generated from the following file: