Logging capacities

class chemfiles::Logger

The Logger class is a singleton class providing logging facilities.

Public Type

LogLevel enum

The LogLevel control what will be logged and what will be dismissed.

Values:

  • NONE = = 0 -

    No logging at all.

  • ERROR = = 1 -

    Logging only errors.

  • WARNING = = 2 -

    Logging errors and warnings.

  • INFO = = 3 -

    Logging errors, warnings and informations.

  • DEBUG = = 4 -

    Logging everything and debug informations.

Public Static Functions

void level(LogLevel)

Set the logging level.

LogLevel level()

Get the current logging level.

void log_to_file(const std::string & filename)

Set the file for logging.

void log_to_stdout()

Make the logger output to stdout.

void log_to_stderr()

Make the logger output to stderr.

void log_to_stdlog()

Make the logger output to stdlog.

std::ostream & out(LogLevel level)

Get the singleton out stream.