Skip to content

Commit

Permalink
feat: refactor logger class
Browse files Browse the repository at this point in the history
  • Loading branch information
pmareke committed Sep 26, 2024
1 parent 24b6b58 commit d0231a5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/common/logger.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import logging
from logging import INFO
from logging import INFO, Formatter, StreamHandler, getLogger

from src.common.settings import settings


def setup_logging() -> None:
handler = logging.StreamHandler()
handler.setLevel(INFO)

format = "%(levelname)s: %(asctime)s - %(message)s"
formatter = logging.Formatter(format)
formatter = Formatter(format)

handler = StreamHandler()
handler.setLevel(INFO)
handler.setFormatter(formatter)

logger = logging.getLogger(settings.logger_name)
logger = getLogger(settings.logger_name)
logger.setLevel(INFO)
logger.addHandler(handler)

0 comments on commit d0231a5

Please sign in to comment.