Skip to content

Commit

Permalink
fix logger
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaza committed Dec 13, 2024
1 parent 64fff29 commit b09b882
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions experiment_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ def turn_off_package_logger(package: str):
def get_logger(name: str):
logger = logging.getLogger(name)
logger.setLevel(logging.INFO)

# Corrected the condition to remove handlers if they exist

for handler in logger.handlers[::-1]:
logger.removeHandler(handler)

console_handler = logging.StreamHandler()
formatter = logging.Formatter(
fmt='%(asctime)s %(message)s',
Expand Down

0 comments on commit b09b882

Please sign in to comment.