-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console][HttpKernel] Handle new SHELL_VERBOSITY env var, also configures the default logger #24425
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
Conversation
19e975e
to
de0838b
Compare
fcaac72
to
630d5dd
Compare
630d5dd
to
87bd741
Compare
The Reading and writing global variables inside classes looks like a bad practice. This should be delegated to a config/context layer. |
@GromNaN it's not exactly for that, but to create an environment context that mirrors the |
Thank you @nicolas-grekas. |
…ar, also configures the default logger (nicolas-grekas) This PR was merged into the 3.4 branch. Discussion ---------- [Console][HttpKernel] Handle new SHELL_VERBOSITY env var, also configures the default logger | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - On the CLI, the behavior of the new default logger is not nice: it's verbosity is controlled by `kernel.debug`, where I would expect to be able to control it by mean of verbosity. To achieve this, I propose to handle a new `SHELL_VERBOSITY` env var, and use it to control both commands' verbosity, and the logger's log level. Commits ------- 87bd741 [Console][HttpKernel] Handle new SHELL_VERBOSITY, also configures the default logger
TLDR: the value in It looks like this PR overwrites the verbosity level set by calling Anyway, here is how we used it in LiipFunctionalTestBundle:
During my own tests, |
That's probably because of the For the rest, I suggest to open a new issue if you feel something is not working as expected. |
Unexpected result of this PR that CLI commands in debug mode now do not write debug and info logs, because of default value |
On the CLI, the behavior of the new default logger is not nice: it's verbosity is controlled by
kernel.debug
, where I would expect to be able to control it by mean of verbosity.To achieve this, I propose to handle a new
SHELL_VERBOSITY
env var, and use it to control both commands' verbosity, and the logger's log level.