frompylogging.loggerimportLoggerfrompylogging.log_levelimportLogLevellogger=Logger()
logger.log(LogLevel.INFO, "Connection initialized")
logger.log(LogLevel.WARNING, "The rat bit your cables")
logger.log(LogLevel.ERROR, "The plague of rats in the server room")
Formatters
Scope
frompylogging.loggerimportLoggerfrompylogging.log_levelimportLogLevellogger=Logger()
logger.set_options({"scope": True})
logger.log(LogLevel.ERROR, "Cannot connect to host")