-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Changes static content deploy log levels verbosity #13709
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
Changes static content deploy log levels verbosity #13709
Conversation
8a935c7 to
d549014
Compare
…hey cause the Magento/blank theme to be outputted twice for some reason...
|
As you may have noticed, the Bit offtopic, but another thing I've noticed is those two |
|
Hi @hostep thank you for this PR. I agree that the static content deploy script does seem odd being in red. I do have a question with regards to other commands. How will this change effect them? Are there any other commands that will also need to be updated? Or will this update other commands to now show red text or more detailed messages when not desired? |
|
Hi David Quite frankly: I only tested the Do you happen to know if other commands also use code from the |
|
From a quick look through the code, it looks like these commands are being defined in the
I'll try to find some time to test if these are getting affected by the changes proposed here. |
|
@dmanners: ok, I took another look at the code, searched through all Magento files and tried to figure out in which commands the touched code is being used, and it looks like it is only used in the Just to be sure, I executed all the above commands from my previous post in various ways with my current commit and checked against commit 9d9a6c3 (which is the parent of my commits), and I can see zero differences in the output, except for the So should be good to go I believe, but feel free to verify these things yourselves :) |
|
Thank you @hostep for the investigation. I will take this pr and have a look also just to make sure :) |
|
Hi @hostep, |
|
Nice thanks! Yes I can create a PR for 2.3 as well, probably tonight. |
…bosity magento#13709 (cherry picked from commit c8dc954)
Description
This is suggested change to how the log levels of the static content deploy is mapped to the verbosity of the output.
When deploying the static content, currently Magento outputs two messages using the log level 'alert':
Deploy using {some-strategy} strategyExecution time: {time-it-took-to-run-the-command}In my opinion, this is incorrect, 'alert' means that something is not quite right, PSR-3 describes the alert log level as 'Action must be taken immediately.' which is very incorrect in this case.
And this also results in outputting the messages with a red background in the terminal, which looks very scary.
This PR proposes to change the log level to 'notice' for these two messages.
But when doing this, the messages are no longer outputted, because they are mapped to the output's verbosity level of 'verbose', so they only show up when providing the
-vflag.I propose to increase the verbosity of the 'notice' log level to 'normal' so those messages get displayed, without providing the
-vflag.I've also increased the verbosity level of the 'info' log level to 'verbose', and changed the output of a bunch of other messages from 'notice' to 'info' to keep them behaving the same as how they behave currently (= only outputted when providing
-vflag). Examples of these messages:Processing file 'app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/checkout/_progress-bar.less' for area 'frontend', theme 'Magento/luma', locale 'default'module 'Magento_Checkout'Processing file 'app/design/frontend/Magento/luma/web/images/select-bg.svg' for area 'frontend', theme 'Magento/luma', locale 'default'Processing file 'app/design/frontend/Magento/luma/web/fonts/Luma-Icons.woff' for area 'frontend', theme 'Magento/luma', locale 'default'If we want to follow the PSR-3 log levels strictly, we probably should even do more drastic changes:
-vvvis usedI'm a bit hesitant to already do this, as it leaves very little moving space for some in-between verbosity level mapping, since all but one log level would all be mapped to verbosity 'normal', only 'debug' log level would be mapped to the 'debug' verbosity output, which is maybe not flexible enough for future additions.
Does this makes sense? What do you guys think?
Results
Before:

After:

Fixed Issues (if relevant)
Manual testing scenarios
bin/magento setup:static-content:deploy -fwith different verbosity flags:-v,-vvor-vvvContribution checklist