[GH-ISSUE #749] NullHandler doesn't bubble #283

Closed
opened 2026-03-04 02:13:48 +03:00 by kerem · 1 comment
Owner

Originally created by @apflieger on GitHub (Mar 19, 2016).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/749

The current implementation of NullHandler doesn't allow the handler to bubble, it doesn't care about the bubble attrbute at all.

Here's a use case of having the NullHandler to bubble :

I'm using MonologBundle and I configure it to have the same handlers for all symfony's environments. I still need to disable some handlers so I simply override the type to "null" in config_*.yml and expect them to be noop and bubble.

Anyway, it's weird that it behaves differently from all other handlers (I suppose all, I didn't check)

Let me know what you think about it :)

Originally created by @apflieger on GitHub (Mar 19, 2016). Original GitHub issue: https://github.com/Seldaek/monolog/issues/749 The current implementation of NullHandler doesn't allow the handler to bubble, it doesn't care about the `bubble` attrbute at all. Here's a use case of having the NullHandler to bubble : I'm using MonologBundle and I configure it to have the same handlers for all symfony's environments. I still need to disable some handlers so I simply override the type to "null" in config_*.yml and expect them to be noop and bubble. Anyway, it's weird that it behaves differently from all other handlers (I suppose all, I didn't check) Let me know what you think about it :)
kerem closed this issue 2026-03-04 02:13:48 +03:00
Author
Owner

@Seldaek commented on GitHub (Mar 22, 2016):

The point of the null handler is to suppress all log records, so if it bubbled it would just become a noop and might as well not be there. You could use a type group or something instead if you want a noop.

<!-- gh-comment-id:199776228 --> @Seldaek commented on GitHub (Mar 22, 2016): The point of the null handler is to suppress all log records, so if it bubbled it would just become a noop and might as well not be there. You could use a type group or something instead if you want a noop.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#283
No description provided.