symfony icon indicating copy to clipboard operation
symfony copied to clipboard

[Console] Add env var to disable direct output

Open wouterj opened this issue 2 years ago • 3 comments

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?

wouterj avatar Dec 18 '23 11:12 wouterj

what's the difference with SHELL_VERBOSITY=-1? https://symfony.com/doc/current/console/verbosity.html

ro0NL avatar Dec 18 '23 12:12 ro0NL

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

ro0NL avatar Dec 18 '23 12:12 ro0NL

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).

wouterj avatar Dec 18 '23 12:12 wouterj