[Console] Add env var to disable direct output
| Q | A |
|---|---|
| Branch? | 7.1 |
| Bug fix? | no |
| New feature? | yes |
| Deprecations? | no |
| Issues | Fix #52777 |
| License | MIT |
This is useful when running in a containerized application and you've configured Monolog to write to stdout (probably using a JSON format).
Alternatively, we can also introduce a LoggerOutput that writes each line to an INFO log message. This can result in double messages, but has the benefit that commands don't have to be written so that useful information is logged. What do you think of this?
what's the difference with SHELL_VERBOSITY=-1? https://symfony.com/doc/current/console/verbosity.html
Also, AFAIK the trick in docker envs et al is to use different process: https://github.com/relaxart/monolog-docker-handler/blob/master/src/DockerMonologHandler.php
what's the difference with SHELL_VERBOSITY=-1?
As indicated in the issue, we have some rendering that still outputs with quiet/verbosity=-1 (e.g. errors).