Skip to content

Commit

Permalink
fix: removes duplicated log messages
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 committed Mar 22, 2024
1 parent 7e80c5f commit d209ff8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion trestlebot/entrypoints/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ def configure_logger(level: int = logging.INFO) -> None:
# Create a StreamHandler to send non-error logs to stdout
stdout_info_handler = logging.StreamHandler(sys.stdout)
stdout_info_handler.setLevel(logging.INFO)
stdout_info_handler.addFilter(log.SpecificLevelFilter(logging.INFO))

stdout_debug_handler = logging.StreamHandler(sys.stdout)
stdout_debug_handler.setLevel(logging.DEBUG)
stdout_debug_handler.addFilter(log.SpecificLevelFilter(logging.DEBUG))

# Create a StreamHandler to send error logs to stderr
stderr_handler = logging.StreamHandler(sys.stderr)
stderr_handler.setLevel(logging.ERROR)
stderr_handler.setLevel(logging.WARNING)

# Create a formatter and set it on both handlers
detailed_formatter = logging.Formatter(
Expand Down

0 comments on commit d209ff8

Please sign in to comment.