Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[MonologBridge] MakeConsoleHandler not handle messages at SILENT verbosity#60055
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[MonologBridge] MakeConsoleHandler not handle messages at SILENT verbosity#60055
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
5dff435 todbd58bcCompare
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Are you suggesting this should be enabled by default, but we don't change it because that'd change the existing behavior?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
dbd58bc toc34db51Compareokhoshi commentedApr 8, 2025
The existing behavior is preserved if the new |
c34db51 toa827b61Compare
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Uh oh!
There was an error while loading.Please reload this page.
cfaf929 to156f97fCompare$handleSilent constructor argument toConsoleHandlerConsoleHandler not handle messages at SILENT verbosityConsoleHandler not handle messages at SILENT verbosityConsoleHandler not handle messages at SILENT verbosity156f97f toc6bed0cCompare…erbositySigned-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
c6bed0c toc7e655dComparenicolas-grekas commentedSep 9, 2025
Thank you@okhoshi. |
91f04e9 intosymfony:7.3Uh oh!
There was an error while loading.Please reload this page.
wouterj commentedSep 15, 2025
Oh, this indeed was an oversight. The use-case you're describing makes perfect sense, thanks for sending in the fix! |
Uh oh!
There was an error while loading.Please reload this page.
Original description
Adding a new constructor parameter to ConsoleHandler to let it bubble messages when the output is set at Silent verbosity level (like when using `--silent` in the CLI).
Messages are dropped by the ConsoleHandler down the line because of the verbosity, but they are considered as handled and so bubbling is interrupted if the handler is set with
$bubble = false. The use-case is to have the messages being either printed by the ConsoleHandler (and so seen by the person running the CLI) or sent to the logging system by the next handlers, but not both.Tweaking the
$verbosityLevelMapis not perfect because EMERGENCY level can never be marked as not handled.With this change, the behaviour is more consistent between Silent and Quiet verbosity levels.
Messages are dropped by the ConsoleHandler down the line because of the verbosity, but they are considered as handled and so bubbling is interrupted if the handler is set with
$bubble = false. The use-case is to have the messages being either printed by the ConsoleHandler (and so seen by the person running the CLI) or sent to the logging system by the next handlers, but not both.By not handling messages when the ConsoleHandler verbosity is set to silent, the behaviour is more consistent between, Silent and all the other verbosity levels.