[GH-ISSUE #1408] Assign custom name to handler to modify their settings on the fly #589

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

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);

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);
kerem 2026-03-04 02:16:13 +03:00
  • closed this issue
  • added the
    Feature
    label
Author
Owner

@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.

<!-- gh-comment-id:567935711 --> @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.
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#589
No description provided.