pynitride.core.logging_ module¶
- pynitride.core.logging_.log(msg, level='info')¶
Logs a message if it is severe enough.
For info on the severity setting, see
set_level()- Parameters:
msg – the string to log
level – the severity of the message, one of “error”, “warning”, “info”, “debug”, “TODO”
- pynitride.core.logging_.log_fail()¶
Convenience function which logs the most recent traceback.
- pynitride.core.logging_.set_level(level=None)¶
Sets the minimum severity for a message to be printed.
The
log()function will ignore messages below the set level.- Parameters:
level – the severity of the message, one of “error”, “warning”, “info”, “debug”, “TODO”. Or None, to use the default from config.ini
- pynitride.core.logging_.start_log_file(filename, overwrite=True)¶
Establishes a log file to direct subsequent messages
- Parameters:
filename – path of the log file
overwrite – whether to overwrite or append