How To Specify 'logger' For Apscheduler
I'm trying to learn how to use Python's apscheduler package, but periodically, it throws the following error: No handlers could be found for logger 'apscheduler.scheduler' This me
Solution 1:
You can just create a default logger and everything should go to it:
import logging
logging.basicConfig()
The reason that you only have a problem when you use a variable that hasn't been defined is that this causes the jobTester
function to throw an error which apscheduler is catching and trying to write the error message with logging.error()
. Since you haven't setup the logger it is going to complain.
If you read up on python logging you will see that there are many ways to configure it. You could have it log everything to a file or print it to stdout.
Post a Comment for "How To Specify 'logger' For Apscheduler"