Skip to content

Commit

Permalink
Merge pull request #22 from State-of-The-MLOps/feature/color_logger
Browse files Browse the repository at this point in the history
Add color to logger
  • Loading branch information
ehddnr301 authored Sep 23, 2021
2 parents 36a465f + 648f72f commit c48e45a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions logger.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import logging
import logging.handlers
from colorlog import ColoredFormatter

L = logging.getLogger('snowdeer_log')
L.setLevel(logging.DEBUG)

formatter = logging.Formatter(
fmt="%(asctime)s [%(levelname)s] [%(filename)s:%(lineno)d - %(funcName)20s()]\n\t%(message)s",
formatter = ColoredFormatter(
fmt="%(log_color)s [%(levelname)s] %(reset)s %(asctime)s [%(filename)s:%(lineno)d - %(funcName)20s()]\n\t%(message)s",
datefmt='%y-%m-%d %H:%M:%S'
)

Expand Down
Binary file modified requirements.txt
Binary file not shown.

0 comments on commit c48e45a

Please sign in to comment.