Skip to content

Commit

Permalink
fix processing logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bento007 committed Jan 11, 2023
1 parent 63aa435 commit 2eeaa5c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/layers/processing/logger.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import logging
import sys

from pythonjsonlogger import jsonlogger

from backend.common.logging_config import DATETIME_FORMAT, LOG_FORMAT


def configure_logging():
log_stdout_handler = logging.StreamHandler(stream=sys.stdout)
formatter = jsonlogger.JsonFormatter(LOG_FORMAT, DATETIME_FORMAT)
logging.basicConfig(formatter=formatter)
log_stdout_handler.setFormatter(formatter)
logging.basicConfig(handlers=[log_stdout_handler])

0 comments on commit 2eeaa5c

Please sign in to comment.