Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[MonologBridge] Add$handleSilent constructor argument toConsoleHandler#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

Open
Okhoshi wants to merge1 commit intosymfony:7.4
base:7.4
Choose a base branch
Loading
fromOkhoshi:monolog-consolehandler-handle-silent

Conversation

Okhoshi
Copy link
Contributor

@OkhoshiOkhoshi commentedMar 26, 2025
edited
Loading

QA
Branch?7.3
Bug fix?no
New feature?yes
Deprecations?no
IssuesNone
LicenseMIT

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$verbosityLevelMap is 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.

@OkhoshiOkhoshiforce-pushed themonolog-consolehandler-handle-silent branch from5dff435 todbd58bcCompareApril 1, 2025 15:14
Copy link
Member

@nicolas-grekasnicolas-grekas left a 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?

…andler`Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
@OkhoshiOkhoshiforce-pushed themonolog-consolehandler-handle-silent branch fromdbd58bc toc34db51CompareApril 8, 2025 14:20
@Okhoshi
Copy link
ContributorAuthor

Are you suggesting this should be enabled by default, but we don't change it because that'd change the existing behavior?

The existing behavior is preserved if the new$handleSilent argument is set to true, hence why it's the default value. But it would be more consistent across the different verbosities if it was set to false.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@TobionTobionTobion approved these changes

@OskarStarkOskarStarkAwaiting requested review from OskarStark

@nicolas-grekasnicolas-grekasAwaiting requested review from nicolas-grekas

Assignees
No one assigned
Projects
None yet
Milestone
7.4
Development

Successfully merging this pull request may close these issues.

6 participants
@Okhoshi@nicolas-grekas@Tobion@OskarStark@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp