Logging

class tissue_forge.Logger

The Tissue Forge logger.

A set of static method for setting the logging level.

static setLevel(*args, **kwargs) void

Set the Level objectsets the logging level to one a value from Logger::Level

Parameters:

level (int) – logging level

static getLevel() int

Get the Level objectget the current logging level.

Return type:

int

Returns:

int

static disableLogging() void

Suppresses all logging output

static enableConsoleLogging(*args, **kwargs) void

turns on console logging at the given level.

Parameters:

level (int) – logging level

static disableConsoleLogging() void

stops logging to the console, but file logging may continue.

static enableFileLogging(*args, **kwargs) void

turns on file logging to the given file as the given level.

If fileName is an empty string, then nothing occurs.

Parameters:
  • fileName (string) – path to log file

  • level (int) – logging level

static disableFileLogging() void

turns off file logging, but has no effect on console logging.

static getCurrentLevelAsString() std::string

get the textural form of the current logging level.

Return type:

string

Returns:

std::string

static getFileName() std::string

Get the File Name objectget the name of the currently used log file.

Return type:

string

Returns:

std::string

static levelToString(level: int) std::string

gets the textual form of a logging level Enum for a given value.

static stringToLevel(str: std::string const &) TissueForge::LogLevel

parses a string and returns a Logger::Level

static log(level: TissueForge::LogLevel, msg: std::string const &) void

logs a message to the log.

Parameters:
  • level (int) – logging level

  • msg (string) – log message