mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-02-24 14:57:16 +08:00
Some changes for debug logging
This commit is contained in:
parent
b74249e691
commit
4a753c06db
2 changed files with 8 additions and 5 deletions
|
@ -4,9 +4,12 @@ import os
|
|||
import logging
|
||||
import re
|
||||
import types
|
||||
import platform
|
||||
|
||||
from logging.handlers import TimedRotatingFileHandler
|
||||
from get_args import args
|
||||
from config import settings
|
||||
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
@ -72,6 +75,10 @@ def configure_logging(debug=False):
|
|||
logging.getLogger("subzero").setLevel(logging.DEBUG)
|
||||
logging.getLogger("git").setLevel(logging.DEBUG)
|
||||
logging.getLogger("apprise").setLevel(logging.DEBUG)
|
||||
logging.debug('Bazarr version: %s', os.environ["BAZARR_VERSION"])
|
||||
logging.debug('Bazarr branch: %s', settings.general.branch)
|
||||
logging.debug('Operating system: %s', platform.platform())
|
||||
logging.debug('Python version: %s', platform.python_version())
|
||||
else:
|
||||
logging.getLogger("apscheduler").setLevel(logging.WARNING)
|
||||
logging.getLogger("subliminal").setLevel(logging.CRITICAL)
|
||||
|
|
|
@ -76,6 +76,7 @@ gc.enable()
|
|||
update_notifier()
|
||||
|
||||
os.environ["SZ_USER_AGENT"] = "Bazarr/1"
|
||||
os.environ["BAZARR_VERSION"] = bazarr_version
|
||||
|
||||
configure_logging(settings.general.getboolean('debug') or args.debug)
|
||||
|
||||
|
@ -103,11 +104,6 @@ c.execute("UPDATE system SET configured = 0, updated = 0")
|
|||
conn.commit()
|
||||
c.close()
|
||||
|
||||
logging.debug('Bazarr version: %s', bazarr_version)
|
||||
logging.debug('Bazarr branch: %s', settings.general.branch)
|
||||
logging.debug('Operating system: %s', platform.platform())
|
||||
logging.debug('Python version: %s', platform.python_version())
|
||||
|
||||
# Load languages in database
|
||||
load_language_in_db()
|
||||
|
||||
|
|
Loading…
Reference in a new issue