Uranium
Application Framework
 All Classes Namespaces Files Functions Variables Pages
UM.Logger.Logger Class Reference

Static class used for logging purposes. More...

Public Member Functions

def __init__
 
def addLogger
 Add a logger to the list. More...
 
def getLoggers
 Get all loggers. More...
 
def log
 Send a message of certain type to all loggers to be handled. More...
 
def logException
 Logs that an exception occurs. More...
 

Detailed Description

Static class used for logging purposes.

This class is only meant to be used as a static class.

Member Function Documentation

def UM.Logger.Logger.addLogger (   cls,
  logger 
)

Add a logger to the list.

Parameters
loggerLogger
def UM.Logger.Logger.getLoggers (   cls,
  List,
  Logger 
)

Get all loggers.

Returns
list List of Loggers
def UM.Logger.Logger.log (   cls,
  log_type 
)

Send a message of certain type to all loggers to be handled.

This method supports placeholders in either str.format() style or % style. For more details see the respective Python documentation pages.

Note that only str.format() supports keyword argument placeholders. Additionally, if str.format() makes any changes, % formatting will not be applied.

Parameters
log_typestring Values must be; 'e' (error) , 'i'(info), 'd'(debug) or 'w'(warning).
messagestring containing message to be logged
*argslist List of placeholder replacements that will be passed to str.format() or %.
**kwargsdict List of placeholder replacements that will be passed to str.format().
def UM.Logger.Logger.logException (   cls,
  log_type 
)

Logs that an exception occurs.

It'll include the traceback of the exception in the log message. The traceback is obtained from the current execution state.

Parameters
log_typeThe importance level of the log (warning, info, etc.).
messageThe message to go along with the exception.

The documentation for this class was generated from the following file: