Easy3D 2.5.3
easy3d::logging Namespace Reference

The logging mechanism. More...

Classes

class  Logger
 

Functions

void initialize (bool info_to_stdout=false, bool warning_to_stdcout=true, bool error_to_stdcout=true, bool verbose_to_stdcout=false, const std::string &log_file="default", int verbosity_threshold=9)
 Initializes the logging module. More...
 
bool is_initialized ()
 Returns whether the logging has been initialized.
 
std::string log_file ()
 Returns the full path of the log file (empty if no log file has been created).
 

Detailed Description

The logging mechanism.

Function Documentation

◆ initialize()

void easy3d::logging::initialize ( bool  info_to_stdout = false,
bool  warning_to_stdcout = true,
bool  error_to_stdcout = true,
bool  verbose_to_stdcout = false,
const std::string &  log_file = "default",
int  verbosity_threshold = 9 
)

Initializes the logging module.

Parameters
info_to_stdouttrue to log messages at a the INFO level to standard output.
warning_to_stdcouttrue to log messages at a the WARNING level to standard output.
error_to_stdcouttrue to log messages at a the ERROR (including FATAL) level to standard output.
verbose_to_stdcouttrue to log messages at a the ERROR (including FATAL) level to standard output.
log_fileA string specifying the name of log file. Three different values are accepted:
  • "": an empty string, indicating that no log file will be created.
  • "default": create a log file with a title in the form "AppName.log" next to the executable file.
  • any non-empty string: (if it is a valid path) a log file with the same name will be created and log messages will be written to this file.
verbosity_thresholdA VLOG(level) with level <= verbosity_threshold will be written into the log file (if specified). Value must be in the range [0, 9]. Default is 0.
Note
This initialization is optional. If not called, log messages will be written to standard output only.
Examples
Tutorial_203_Viewer_wxWidgets.