Logging

class tissue_forge.Logger

The Tissue Forge logger.

A set of static method for setting the logging level.

static setLevel(*args, **kwargs)

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

Parameters:

level (int, optional) – logging level

static getLevel()

Get the Level objectget the current logging level.

Return type:

int

Returns:

int

static disableLogging()

Suppresses all logging output

static enableConsoleLogging(*args, **kwargs)

turns on console logging at the given level.

Parameters:

level (int, optional) – logging level

static disableConsoleLogging()

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

static enableFileLogging(*args, **kwargs)

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

If fileName is an empty string, then nothing occurs.

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

  • level (int, optional) – logging level

static disableFileLogging()

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

static getCurrentLevelAsString()

get the textural form of the current logging level.

Return type:

string

Returns:

std::string

static getFileName()

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

Return type:

string

Returns:

std::string

static levelToString(level)

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

static stringToLevel(str)

parses a string and returns a Logger::Level

static log(level, msg)

logs a message to the log.

Parameters:
  • level (int) – logging level

  • msg (string) – log message