Logging¶
-
rumba.log.
set_logging_level
(level, name=None)[source]¶ Set the current logging level to
level
for the logger namedname
. Ifname
is not specified, sets the logging level for all rumba loggers.Parameters: - level (
str
orint
) – the desired logging level, in string or int form. - name (
str
) – The name of the logger to configure
Note
Accepted levels are:
- DEBUG == 10,
- INFO == 20,
- WARNING == 30,
- ERROR == 40,
- CRITICAL == 50,
- NOTSET == 0 (resets the logger: its level is set to the default or its parents’ level)
- level (
-
rumba.log.
reset_logging_level
()[source]¶ Resets the current logging level of all loggers to the default. For the Rumba library the default is INFO.
-
rumba.log.
flush_and_kill_logging
()[source]¶ Flushes all queued log messages and stops the logging facility. Since the logging is done by a daemon thread, log entries might be lost if execution is interrupted abruptly. Call this method to make sure this does not happen.
-
class
rumba.log.
LogOptions
[source]¶ Class holding the logging configuration
-
log_to_console
()[source]¶ Set the logging framework to log to stdout on top of the other configured logging facilities
Returns: this LogOptions
instance
-
log_to_file
(path='rumba.log')[source]¶ Set the logging framework to log to file on top of the other logging facilities.
Parameters: path ( str
) – logging file filenameReturns: this LogOptions
instance
-
reset_logging
()[source]¶ Disable all logging facilities
Returns: this LogOptions
instance
-