The package has this code:
logger = logging.getLogger(name)
How can I add a handler so the logger will write logs to a file?
The package has this code:
logger = logging.getLogger(name)
How can I add a handler so the logger will write logs to a file?
Very basic example:
file_handler = logging.FileHandler("output.log")
logger.addHandler(file_handler)
Should I access the logger from outside the library?