Spaces:
Sleeping
Sleeping
File size: 581 Bytes
96f6720 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import logging
import os
from dotenv import load_dotenv
load_dotenv()
PROJECT_NAME = 'healthai-chef'
default_log_args = {
'level': logging.DEBUG if int(os.getenv('DEBUG', '0')) else logging.INFO,
'format': '%(asctime)s [%(levelname)s] %(filename)s:%(lineno)d - %(message)s',
'datefmt': '%d-%b-%y %H:%M:%S',
'force': True,
}
logging.basicConfig(**default_log_args)
logger = logging.getLogger(PROJECT_NAME)
# disable 3rd party logs
LOGGERS_TO_DISABLE = [
]
for logger_name in LOGGERS_TO_DISABLE:
logging.getLogger(logger_name).setLevel(logging.CRITICAL + 1)
|