1
0
Fork 0
onnx-web/api/onnx_web/logging.py

16 lines
425 B
Python
Raw Normal View History

2023-01-28 23:09:19 +00:00
from logging import getLogger
from logging.config import dictConfig
from os import path
from yaml import safe_load
logging_path = './logging.yaml'
# setup logging config before anything else loads
try:
if path.exists(logging_path):
with open(logging_path, 'r') as f:
config_logging = safe_load(f)
dictConfig(config_logging)
except Exception as err:
print('error loading logging config: %s' % (err))