use and configure custom logger (#1994)

* prepare to log logs

* utils

* discoverability

* forgot
This commit is contained in:
Shane Smiskol
2024-08-05 14:51:56 -07:00
committed by GitHub
parent 3c1def1cc5
commit 1cbcc13c35
4 changed files with 46 additions and 38 deletions

11
python/utils.py Normal file
View File

@@ -0,0 +1,11 @@
import os
import logging
# set up logging
LOGLEVEL = os.environ.get('LOGLEVEL', 'INFO').upper()
logger = logging.getLogger('panda')
logger.setLevel(LOGLEVEL)
handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter('%(message)s'))
logger.addHandler(handler)