Skip to content
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

Needless email when using monolog + mail + fingers_crossed #46801

Closed
apfelbox opened this issue Jun 29, 2022 · 2 comments
Closed

Needless email when using monolog + mail + fingers_crossed #46801

apfelbox opened this issue Jun 29, 2022 · 2 comments

Comments

@apfelbox
Copy link
Contributor

Symfony version(s) affected

6.1.0

Description

Hi,

I have configured error mails for my project:

monolog:
    handlers:
        main:
            type: fingers_crossed
            action_level: error
            handler: grouped
            excluded_http_codes: [404, 405]
            buffer_size: 50

        grouped:
            type: group
            members: [nested, deduplicated]
        
        deduplicated:
            type: deduplication
            handler: symfony_mailer

        symfony_mailer:
            type:       symfony_mailer
            from_email: '...'
            to_email:   '...'
            subject:    '[Error] %%message%%'
            level:      debug
            formatter:  monolog.formatter.html
            content_type: text/html

and now I always get 2 (!) mails:

one with the actual error log and then this one immediately afterwards:
CleanShot 2022-06-29 at 12 30 52

Can I disable the second mail, as it provides no value to me. 😅

How to reproduce

See config above

Possible Solution

No response

Additional Context

No response

@raziel057
Copy link
Contributor

Yes it’s a known issue. See symfony/monolog-bundle#405

Aa a workaround can exclude the mailer channel as explained here symfony/monolog-bundle#405 (comment)

@xabbuh
Copy link
Member

xabbuh commented Jul 4, 2022

closing in favor of symfony/monolog-bundle#405 then

@xabbuh xabbuh closed this as not planned Won't fix, can't repro, duplicate, stale Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants