Skip to content

Debug toolbar's ThreadTrackingHandler mutes Daphne errors #1300

Closed
@JulienPalard

Description

@JulienPalard

In a "basic" setup, with django/channels, django/daphne, and debug-toolbar installed, and no specific configuration, Daphne logs are lost. I take daphne as an example, but any application or library not logging under the django namespace are lost the same (but could be displayed in the debug toolbar).

This is because we're relying, maybe too much, on the lastResort logger to log messages to stderr for any unconfigured logging namespace.

As debug-toolbar installs its ThreadTrackingHandler to the root logger, messages are considered handled by the logging module, which does not use the lastResort logger to log them to stdout: messages are not displayed (and while I'm in a websocket handler, I have no debug toolbar to display them to me).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions