[GH-ISSUE #802] Logging Level for HandlerWrapper and GroupHandler #307

Closed
opened 2026-03-04 02:14:00 +03:00 by kerem · 2 comments
Owner

Originally created by @MaximilianKresse on GitHub (Jun 2, 2016).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/802

Is it possible to add a logging level for the HandlerWrapper and/or the GroupHandler? And if not is there a special reason for this?

e.g.

$log = new Logger('name');
$fileHandler = new StreamHandler('path/to/your.log', Logger::DEBUG);
$log->pushHandler(new HandlerWrapper($fileHandler, Logger::WARNING));
Originally created by @MaximilianKresse on GitHub (Jun 2, 2016). Original GitHub issue: https://github.com/Seldaek/monolog/issues/802 Is it possible to add a logging level for the HandlerWrapper and/or the GroupHandler? And if not is there a special reason for this? e.g. ``` php $log = new Logger('name'); $fileHandler = new StreamHandler('path/to/your.log', Logger::DEBUG); $log->pushHandler(new HandlerWrapper($fileHandler, Logger::WARNING)); ```
kerem closed this issue 2026-03-04 02:14:00 +03:00
Author
Owner

@Seldaek commented on GitHub (Jun 6, 2016):

What would that do? Those handlers are just proxying stuff so they shouldn't filter anything. There is a FilterHandler if you want to filter records by level before it reaches another handler.

<!-- gh-comment-id:223906833 --> @Seldaek commented on GitHub (Jun 6, 2016): What would that do? Those handlers are just proxying stuff so they shouldn't filter anything. There is a FilterHandler if you want to filter records by level before it reaches another handler.
Author
Owner

@MaximilianKresse commented on GitHub (Jun 6, 2016):

Ohhh ^^ Thank you. I just didn't seen it.

<!-- gh-comment-id:224010318 --> @MaximilianKresse commented on GitHub (Jun 6, 2016): Ohhh ^^ Thank you. I just didn't seen it.
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#307
No description provided.