pallets / pallets/quart

'quart.app' vs 'app' for log level configuration via dictConfig

Open
#334 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.7k
Forks
206
PR merge metrics
No merged PRs in 30d

Description

Per the quart documentation, logging configuration can be provided by configuring a logger called 'quart.app' via dictConfig. However, I've found that the log level pulled from current_app.logger uses the name 'app', rather than 'quart.app', and can therefore only be configured by setting 'app' up in dictConfig.

Example:
I would expect a configuration that looks like this:
image
to configure current_app.logger with a log level of INFO, per your documentation, but it actually sets that logger to WARN, since it's using 'app'
image

Environment:

  • Python version: 3.10.13
  • Quart version: 0.19.4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Quart logging documentation and compare the documented 'quart.app' dictConfig entry with the logger name used by current_app.logger. Reproduce the INFO-versus-WARN behavior from the issue, then verify that the documented configuration controls the application logger and that the behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, observability-sre
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.