Skip to content

feat(asgi): no longer add NullHandler to the falcon logger#2595

Merged
vytas7 merged 1 commit intofalconry:masterfrom
vytas7:2594-last-resort-traceback-log
Jan 18, 2026
Merged

feat(asgi): no longer add NullHandler to the falcon logger#2595
vytas7 merged 1 commit intofalconry:masterfrom
vytas7:2594-last-resort-traceback-log

Conversation

@vytas7
Copy link
Member

@vytas7 vytas7 commented Jan 18, 2026

We used to add a NullHandler() to falcon._logger which could be done according to the stdlib's docs,

"if you want to prevent your library's logged events being output to sys.stderr in the absence of logging configuration."

However, this has mostly resulted in confusion for people trying the ASGI flavour of the framework as HTTP 500 tracebacks may disappear completely, so the revised choice is NOT to prevent last resort logging to sys.stderr.

Fixes #2594.

@vytas7 vytas7 requested review from CaselIT and kgriffs January 18, 2026 11:40
@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ecb7218) to head (d9709ed).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2595   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           64        64           
  Lines         7875      7874    -1     
  Branches      1078      1078           
=========================================
- Hits          7875      7874    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@CaselIT CaselIT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

I think it's fine to keep as part of a point release.

@vytas7
Copy link
Member Author

vytas7 commented Jan 18, 2026

I think it's fine to keep as part of a point release.

Aye, don't think it's an issue SemVer wise since it's an implementation detail of the private falcon._logger. We only specify that we use the falcon logger in rare cases where there is no other option, and that we don't configure anything behind the user's back (not any less true than before).

@vytas7 vytas7 merged commit 15e17cf into falconry:master Jan 18, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

falcon.asgi.App() shows 500 error instead of async exception

2 participants