mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 16:15:49 +03:00
[GH-ISSUE #1408] Assign custom name to handler to modify their settings on the fly #589
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#589
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tolgaulas on GitHub (Dec 8, 2019).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1408
It would be beneficial to be able to select an handler by name for modifying their values after the construction.
i.e
$logger->pushHandler(new StreamHandler($logFileName, $level, true /**bubble */, null /**filePermission */, false /**useLocking=false */, "foo"/*Optional name/);
$logger->getHandlerByName("foo")->setLevel(200);
@Seldaek commented on GitHub (Dec 20, 2019):
I don't really see this happening in Monolog itself. Configuration is a framework/app-specific concern.. monolog cascade or similar would be a better place.