BuildCache
Classes | Enumerations | Functions
bcache::debug Namespace Reference

Debug logging functions. More...

Classes

class  log
 A simple log stream object. More...
 

Enumerations

enum  log_level_t {
  DEBUG = 1, INFO = 2, ERROR = 3, FATAL = 4,
  NONE = 5
}
 Recognized debug log levels.
 

Functions

void set_log_level (const int level)
 Set the global log level. More...
 
void set_log_file (const std::string &file)
 Set the global log file. More...
 

Detailed Description

Debug logging functions.

Function Documentation

◆ set_log_file()

void bcache::debug::set_log_file ( const std::string &  file)

Set the global log file.

Parameters
filePath to a log file, or an empty string (indicating stdout).
Note
If the log file is not writable, output will be directed to stdout.

◆ set_log_level()

void bcache::debug::set_log_level ( const int  level)

Set the global log level.

Parameters
levelAn integer that corresponds to a log_level_t enum value.
Note
If level is not a valid log level, the global log level is set to NONE.