Skip to content

How to change the 'time' parameter of the deduplication handler #7896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 3, 2017

Conversation

ThomasLandauer
Copy link
Contributor

Don't know how this needs to be written in XML & PHP, sorry.

Don't know how this needs to be written in XML & PHP, sorry.
Copy link
Member

@xabbuh xabbuh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just pushed an example for the XML and PHP format.

@@ -28,6 +28,8 @@ it is broken down.
handler: deduplicated
deduplicated:
type: deduplication
# uncomment this line for values other than 60 seconds:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment and the provided time: 10 example looks a bit confusing to me. What if we explain this option more in detail and don't include the time: 10 example commented?

deduplicated:
    type:    deduplication
    # the time in seconds during which duplicate entries are discarded (default: 60)
    time: 10
    handler: swift

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like @javiereguiluz suggestion.

@xabbuh xabbuh added this to the 2.7 milestone May 15, 2017
@ThomasLandauer
Copy link
Contributor Author

@javiereguiluz Don't know what you mean exactly.

My motivation for committing this: Right now, the time setting is explained nowhere. I basically guessed how to write it ;-) The existence of the setting is mentioned a few paragraphs further down:

The deduplicated handler simply keeps all the messages for a request and then passes them onto the nested handler in one go, but only if the records are unique over a given period of time (60 seconds by default).

So I figured I could squeeze it right into the first code block. Not ideal, but better than nothing :-)

However, we could certainly create a separate code block for this, maybe something like:

monolog:
    handlers:
        deduplicated:
            type:    deduplication
            handler: swift
            time: 10

... and position it right below the cited paragraph.

@wouterj wouterj merged commit 4b7bc67 into symfony:2.7 Sep 3, 2017
wouterj added a commit that referenced this pull request Sep 3, 2017
…andler (ThomasLandauer, xabbuh)

This PR was merged into the 2.7 branch.

Discussion
----------

How to change the 'time' parameter of the deduplication handler

Don't know how this needs to be written in XML & PHP, sorry.

Commits
-------

4b7bc67 Update monolog_email.rst
da281f2 `time` option
9d2f2fd add XML and PHP config examples
25e0bc1 How to change the 'time' parameter of the deduplication handler
@ThomasLandauer ThomasLandauer deleted the patch-11 branch September 3, 2017 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants