Logging
sumocr by default defines the sumocr
handler and attaches a NullHandler
to it. To configure logging you have two options:
Configure the global/application logger, which the
sumocr
logger will fallback to
import logging
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
logger.addHandler(logging.StreamHandler())
Configure only the
sumocr
logger
import logging
sumocr_logger = logging.getLogger("sumocr")
sumocr_logger.setLevel(logging.DEBUG)
sumocr_logger.addHandler(logging.StreamHandler())
The first option will set the log level for your whole application to DEBUG
, whereas the second option lets you control the log level for only sumocr.