The setup is thus:
I have a command, which calls a function on service X which uses logger Y.
Currently, when run from the console, the log messages are output to the console (using the -v
parameters). I would also like to output those messages to a file, regardless of the -v
level.
Edit: Adding monolog config, as requested (though there's nothing interesting - it's the default).
monolog:
channels: ['amz_update']
handlers:
main:
type: stream
path: '%kernel.logs_dir%/%kernel.environment%.log'
level: emergency
channels: ['!event']
console:
type: console
process_psr_3_messages: false
channels: ['!event', '!doctrine', '!console']
# To follow logs in real time, execute the following command:
# `bin/console server:log -vv`
server_log:
type: server_log
process_psr_3_messages: false
host: 127.0.0.1:9911