In this cookbook article, we can see how to use a custom channel in a service. But how can I use a custom login channel in a command ?
I created a symfony2 command to perform something. I would like to use monolog to log things done by my command.
Actually, I want to write log for my command in another file than the logs of the application.
A similar question were asked and answered here:
How to write logs from one service into separate file?
Thanks