[GH-ISSUE #1608] How DeduplicationHandler works? #687

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

Originally created by @ghost on GitHub (Nov 10, 2021).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1608

Hello!

Have I understood correctly, that DeducpliationHandler lets all log messages through but deduplicates only messages that have level greater or equal to what has been set to DeduplicationHandler::$deduplicationLevel?

I.e. if I have set deduplication level to error and I have 10 debug messages and 10 error messages, all 10 debug messages are passed to wrapped handler and only 1 error message?

Br, Miika

Originally created by @ghost on GitHub (Nov 10, 2021). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1608 Hello! Have I understood correctly, that `DeducpliationHandler` lets all log messages through but deduplicates only messages that have level greater or equal to what has been set to `DeduplicationHandler::$deduplicationLevel`? I.e. if I have set deduplication level to `error` and I have 10 `debug` messages and 10 `error` messages, all 10 `debug` messages are passed to wrapped handler and only 1 `error` message? Br, Miika
kerem 2026-03-04 02:17:00 +03:00
  • closed this issue
  • added the
    Support
    label
Author
Owner

@phroggar commented on GitHub (Feb 17, 2022):

Yes the dedup handler will only look on the level supplied (or greater). Lower levels are passed through without deduplication.

<!-- gh-comment-id:1042948180 --> @phroggar commented on GitHub (Feb 17, 2022): Yes the dedup handler will only look on the level supplied (or greater). Lower levels are passed through without deduplication.
Author
Owner

@Seldaek commented on GitHub (Mar 7, 2022):

Yeah the point is really to use this in combination with a FingersCrossedHandler IMO so that the dumping of debug info etc only happens when a deduplicated error reaches the FingersCrossedHandler. But this may depend on your use case.

<!-- gh-comment-id:1060687894 --> @Seldaek commented on GitHub (Mar 7, 2022): Yeah the point is really to use this in combination with a FingersCrossedHandler IMO so that the dumping of debug info etc only happens when a deduplicated error reaches the FingersCrossedHandler. But this may depend on your use case.
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#687
No description provided.