Skip to content

Commit

Permalink
fix: logger formater is not work (infiniflow#1090)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

as title

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
chinamerp authored Jun 7, 2024
1 parent ac24d2e commit 331f677
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/utils/log_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ def get_handler(class_name, level=None, log_dir=None,
delay=True)
if level:
handler.level = level
else:
handler.level = LoggerFactory.LEVEL

formatter = logging.Formatter(LoggerFactory.LOG_FORMAT)
handler.setFormatter(formatter)

return handler

Expand Down

0 comments on commit 331f677

Please sign in to comment.