Fix logger settings in utils
This commit is contained in:
parent
8f032090ed
commit
bb97eb9e4f
|
@ -6,10 +6,17 @@ import errno
|
|||
import logging
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import typing as T
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(os.environ.get("BOTZ_LOGLEVEL", logging.INFO))
|
||||
sh = logging.StreamHandler(stream=sys.stdout)
|
||||
cli_filter = logging.Filter(__name__)
|
||||
sh.addFilter(cli_filter)
|
||||
sh.setFormatter(logging.Formatter("%(message)s"))
|
||||
logger.addHandler(sh)
|
||||
|
||||
ENC = json.JSONEncoder()
|
||||
DEC = json.JSONDecoder()
|
||||
|
|
Loading…
Reference in New Issue
Block a user