Quote:
Originally Posted by kovidgoyal
What logger are we talking about here? IIRC plugin base classes have no default logger defined? If you want to use a DEBUG level dependent logger, the way to do it is like this:
from calibre.utils.logging import ThreadSafeLog
log = ThreadSafeLog(level=ThreadSafeLog.DEBUG if DEBUG else ThreadSafeLog.WARN)
That means that log.info()/log.debug() will be no-ops unless DEBUG is defined.
|
Then that's probably the source of the problem. I've been using:
Code:
import logging
logger = logging.getLogger(__name__)
I will try that out today. Thanks for your help.