fixed log not being set
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
"""Definition of setup_logging function."""
|
"""Definition of setup_logging function."""
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
@@ -17,7 +16,7 @@ def setup_logging() -> None:
|
|||||||
'%(message)s'
|
'%(message)s'
|
||||||
)
|
)
|
||||||
datefmt = '%Y-%m-%d %H:%M:%S'
|
datefmt = '%Y-%m-%d %H:%M:%S'
|
||||||
logging.basicConfig(format=fmt, datefmt=datefmt, level=level)
|
logging.basicConfig(format=fmt, datefmt=datefmt, level=level, force=True)
|
||||||
# change levels for modules that spam the log
|
# change levels for modules that spam the log
|
||||||
logging.getLogger('pymongo').setLevel(logging.WARNING)
|
logging.getLogger('pymongo').setLevel(logging.WARNING)
|
||||||
logging.getLogger('urllib3').setLevel(logging.INFO)
|
logging.getLogger('urllib3').setLevel(logging.INFO)
|
||||||
|
|||||||
Reference in New Issue
Block a user