symfony-docs
symfony-docs copied to clipboard
[Monolog] Mailer sends second mail if monolog is configured to email errors
As pointed out here there is an issue with the configuration example on https://symfony.com/doc/5.4/logging/monolog_email.html (same issue with newer versions of the doc). Following the first config block, one will always get two error mails if an error occurs.
@raziel057 already explained the reason for the second mail and how to fix it.
I suggest to add the channel constraint to the main handler to the documentation example. So that we have a working example.
What do you think?
and how to fix it.
To me it is more how to hide it Excluding mailer channel can hide other valueable logs i think
But i do not know how to properly fix the root issue, appart removing the log :/
Excluding mailer channel can hide other valueable logs i think
Yes, that was my initial thought, too. But if the mail was sent, there is at least no fatal issue with the mail sending ;-)
Thank you for this issue. There has not been a lot of activity here for a while. Has this been resolved?
I don't know if this is a doc issue or a code issue in Monolog bundle. See https://github.com/symfony/monolog-bundle/issues/405
What should we do here?
Let's close for now in favor of https://github.com/symfony/monolog-bundle/issues/405 and we'll reopen if needed when a decision is done there. Thanks.
That's fine for me. Thanks 👍