I wrote a very simple test command which has LoggerInterface injected in its constructor. How am I suppose to change the monolog.yaml configuration to save this logger output to both log file and to output it to console? Answer The commands will always stderr by default (if you specify the -vvv option) If you need to write the logs in
Tag: symfony-console
Allow any option passed to Symfony CLI
The goal is to allow any options to be passed to symfony CLI, rather than limiting to a defined set of allowed options. For instance: In this example, foo is an option which is not explicitly allowed by the symfony application. My console app is proxying to a different application with a number of CLI options. I do not want
How to identify if an option was supplied without a value with Symfony Console?
With the Symfony3 Console, how can I tell when a user supplied an option, but supplied it without a value? As opposed to not supplying the option at all? As an example, take the following console configuration. The command help will illustrate the option as –option[=OPTION], so I can call this the following ways. However, $input->getOption() will return NULL in