Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
vintagecircuit authored Sep 13, 2023
1 parent eafe91f commit 2323035
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doh_logger.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import logging

def setup_logger(name, log_level=logging.DEBUG):
logger = logging.getLogger(name)
logger.setLevel(log_level)

ch = logging.StreamHandler() # Console Handler
ch.setLevel(log_level)

formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)

logger.addHandler(ch)

return logger

0 comments on commit 2323035

Please sign in to comment.