Uranium
Application Framework
|
Static class used for logging purposes. More...
Public Member Functions | |
__init__ (self) | |
addLogger (cls, "Logger" logger) | |
Add a logger to the list. | |
List["Logger"] | getLoggers (cls) |
Get all loggers. | |
log (cls, str log_type, str message, *args, **kwargs) | |
Send a message of certain type to all loggers to be handled. | |
logException (cls, str log_type, str message, *args) | |
Logs that an exception occurs. | |
Static class used for logging purposes.
This class is only meant to be used as a static class.
UM.Logger.Logger.addLogger | ( | cls, | |
"Logger" | logger | ||
) |
Add a logger to the list.
logger | Logger |
List["Logger"] UM.Logger.Logger.getLoggers | ( | cls | ) |
Get all loggers.
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.
log_type | string Values must be; 'e' (error) , 'i'(info), 'd'(debug) or 'w'(warning). |
message | string containing message to be logged |
*args | list List of placeholder replacements that will be passed to str.format() or %. |
**kwargs | dict List of placeholder replacements that will be passed to str.format(). |
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.
log_type | The importance level of the log (warning, info, etc.). |
message | The message to go along with the exception. |