Skip to content

Commit

Permalink
feat: added logger
Browse files Browse the repository at this point in the history
  • Loading branch information
le1nux committed Jan 16, 2025
1 parent f2a2f6d commit 551b8f5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/modalities/utils/logging.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import logging


def get_logger(name: str = "main") -> logging.Logger:
logger = logging.getLogger(name)
if not logger.handlers:
logger.setLevel(logging.DEBUG)
handler = logging.StreamHandler()
handler.setFormatter(logging.Formatter("%(name)s - %(levelname)s - %(message)s"))
logger.addHandler(handler)
return logger

0 comments on commit 551b8f5

Please sign in to comment.