Uranium
Application Framework
UM.Logger.Logger Class Reference

Static class used for logging purposes. More...

Public Member Functions

def __init__ (self)
 
def addLogger
 Add a logger to the list. More...
 
def getLoggers (cls)
 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...
 
def debug
 Logs a debug message (just a convenience method for log())
 
def info
 Logs an info message (just a convenience method for log())
 
def warning
 Logs a warning message (just a convenience method for log())
 
def error
 Logs an error message (just a convenience method for log())
 
def critical
 Logs a critical message (just a convenience method for log())
 

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: