Skip to content

Commit

Permalink
config: fix huey logs
Browse files Browse the repository at this point in the history
Otherwise huey adds a StreamHandler without proper (JSON) formatting,
duplicating the logs (that still propagate to root logger & its
handlers).
  • Loading branch information
xavfernandez committed Feb 14, 2025
1 parent f84532d commit c1bb340
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@
# Huey; async tasks
"huey": {
"level": os.getenv("HUEY_LOG_LEVEL", "WARNING"),
# Define a null handler to prevent huey from adding a StreamHandler:
# https://github.com/coleifer/huey/blob/2.5.2/huey/contrib/djhuey/management/commands/run_huey.py#L87-L88
# We'll still get the logs since they will propagate to root handlers
"handlers": ["null"],
},
},
}
Expand Down

0 comments on commit c1bb340

Please sign in to comment.