Skip to content

Commit

Permalink
attempt fix: logger handler
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna committed May 5, 2024
1 parent 53b4117 commit 7cced5a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions nx_arangodb/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@

logger = logging.getLogger(__package__)

handler = logging.StreamHandler()
if not logger.handlers:
handler = logging.StreamHandler()

formatter = logging.Formatter(
f"[%(asctime)s] [%(levelname)s]: %(message)s",
"%H:%M:%S %z",
)
formatter = logging.Formatter(
f"[%(asctime)s] [%(levelname)s]: %(message)s",
"%H:%M:%S %z",
)

handler.setFormatter(formatter)
handler.setFormatter(formatter)

logger.addHandler(handler)
logger.addHandler(handler)

logger.setLevel(logging.INFO)

0 comments on commit 7cced5a

Please sign in to comment.