chemfiles::Logger
The Logger class is a singleton class providing logging facilities.
Public Type
Where the log message should go.
Values:
SILENT
- Do not log anything.
STDOUT
- Log to stdout.
STDERR
- Log to stderr.
FILE
- Log to a file.
CALLBACK
- Log to the C callback.
logging_cb
Callback function type for logging the message
at level
Public Static Functions
log
(LogLevel level, std::string message)Log a message
if the level
is lower than the maximal curent logging level.
set_level
(LogLevel)Set the logging level.
level
()Get the current logging level.
to_stdout
()Make the logger output to stdout.
to_stderr
()Make the logger output to stderr.
silent
()Silent the logger.
to_file
(const std::string & path)Make the logger output to the file at path
. The file will be created and overwrited if it already exists.
callback
(logging_cb)Set a callback that will be called to perform logging.
backend
()Get the current logging backend.