Need to set logger.setLevel() again with import changes to see debugs in plugin.

This commit is contained in:
Jim Miller 2021-04-16 14:07:11 -05:00
parent ef7ba42f9a
commit 0d1dd7ab5c

View file

@ -17,7 +17,13 @@
from __future__ import absolute_import from __future__ import absolute_import
try: # just a way to switch between CLI and PI try: # just a way to switch between CLI and PI
import calibre.constants from calibre.constants import DEBUG
if os.environ.get('CALIBRE_WORKER', None) is not None or DEBUG:
loghandler.setLevel(logging.DEBUG)
logger.setLevel(logging.DEBUG)
else:
loghandler.setLevel(logging.CRITICAL)
logger.setLevel(logging.CRITICAL)
except: except:
import sys import sys
if sys.version_info >= (2, 7): if sys.version_info >= (2, 7):