Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Logger.Logger Class Reference

Public Member Functions

 __init__ (self)
 
 addLogger (cls, "Logger" logger)
 
List[Tuple[str, str]] getUnloggedLines (cls)
 
List["Logger"] getLoggers (cls)
 
 log (cls, str log_type, str message, *args, **kwargs)
 
 logException (cls, str log_type, str message, *args)
 
 debug (cls, str message, *args, **kwargs)
 
 info (cls, str message, *args, **kwargs)
 
 warning (cls, str message, *args, **kwargs)
 
 error (cls, str message, *args, **kwargs)
 
 critical (cls, str message, *args, **kwargs)
 

Detailed Description

Static class used for logging purposes. This class is only meant to be used as a static class.

Member Function Documentation

◆ addLogger()

UM.Logger.Logger.addLogger ( cls,
"Logger" logger )
Add a logger to the list.

◆ critical()

UM.Logger.Logger.critical ( cls,
str message,
* args,
** kwargs )
Logs a critical message (just a convenience method for log())

◆ debug()

UM.Logger.Logger.debug ( cls,
str message,
* args,
** kwargs )
Logs a debug message (just a convenience method for log())

◆ error()

UM.Logger.Logger.error ( cls,
str message,
* args,
** kwargs )
Logs an error message (just a convenience method for log())

◆ getLoggers()

List["Logger"] UM.Logger.Logger.getLoggers ( cls)
Get all loggers

:returns: List of Loggers

◆ info()

UM.Logger.Logger.info ( cls,
str message,
* args,
** kwargs )
Logs an info message (just a convenience method for log())

◆ log()

UM.Logger.Logger.log ( cls,
str log_type,
str message,
* args,
** kwargs )
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.

:param log_type: Values must be; 'e' (error) , 'i'(info), 'd'(debug) or 'w'(warning).
:param message: containing message to be logged

:param args: List of placeholder replacements that will be passed to str.format() or %.
:param kwargs: List of placeholder replacements that will be passed to str.format().

◆ logException()

UM.Logger.Logger.logException ( cls,
str log_type,
str message,
* args )
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.

:param log_type: The importance level of the log (warning, info, etc.).
:param message: The message to go along with the exception.

◆ warning()

UM.Logger.Logger.warning ( cls,
str message,
* args,
** kwargs )
Logs a warning message (just a convenience method for log())

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