Skip to content

Commit

Permalink
loghelper improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sofide committed Jun 22, 2024
1 parent f9ca47b commit 4c46481
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kilink/loghelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from logging.handlers import TimedRotatingFileHandler as TRFHandler

from kilink.config import config
from kilink.config import config, ENVIRONMENT_KEY, PROD_ENVIRONMENT_VALUE

log_setup_lock = threading.Lock()

Expand Down Expand Up @@ -62,9 +62,9 @@ def setup_logging(_logger, verbose=False):
_setup(logdir, verbose)

for h in kilink_logger.handlers:
if config['environment'] != 'prod':
if config[ENVIRONMENT_KEY] != PROD_ENVIRONMENT_VALUE:
h.setLevel(logging.DEBUG)
_logger.addHandler(h)

if config['environment'] != 'prod':
if config[ENVIRONMENT_KEY] != PROD_ENVIRONMENT_VALUE:
_logger.setLevel(logging.DEBUG)

0 comments on commit 4c46481

Please sign in to comment.