mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #1356] remove replaced context when using psrlogmessageprocessor #570
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#570
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 @rhrzr on GitHub (Aug 3, 2019).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1356
as far as i know, the psrlogmessageprocessor-class is designed to replace placeholders in messages like
after processing the message, the output is
the replaced context still exists, even though the element 'foo' was properly replaced.
why not remove that context, but keep the context which could not be replaced?
i tried do achieve this goal and this is my solution: (class PsrLogMessageProcessor.php)
if the user wants to keep the context in his message, you could make it an option by introducing a boolean parameter in the constructor.
what do you think about?
@Seldaek commented on GitHub (Aug 15, 2019):
There is already a
$removeUsedContextFieldsoption in the PsrLogMessageProcessor in Monolog 2.0 so closing.