mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-24 16:52:06 +00:00
Optimizing logging
This commit is contained in:
parent
6c92df0861
commit
3eb17ee1ad
1 changed files with 4 additions and 0 deletions
|
@ -34,6 +34,7 @@ from scheduler import *
|
|||
|
||||
import logging
|
||||
from logging.handlers import TimedRotatingFileHandler
|
||||
|
||||
logger = logging.getLogger('waitress')
|
||||
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'))
|
||||
c = db.cursor()
|
||||
|
@ -64,6 +65,9 @@ def configure_logging():
|
|||
f = OneLineExceptionFormatter('%(asctime)s|%(levelname)s|%(message)s|',
|
||||
'%d/%m/%Y %H:%M:%S')
|
||||
fh.setFormatter(f)
|
||||
logging.getLogger("enzyme").setLevel(logging.WARNING)
|
||||
logging.getLogger("apscheduler").setLevel(logging.WARNING)
|
||||
logging.getLogger("subliminal").setLevel(logging.WARNING)
|
||||
root = logging.getLogger()
|
||||
root.setLevel(log_level)
|
||||
root.addHandler(fh)
|
||||
|
|
Loading…
Reference in a new issue