Symfony2 : use Processors while logging in different files

前端 未结 2 1503
夕颜
夕颜 2021-01-07 04:22

I want to write my application logs in another file than the one Symfony2 writes its own logs and system logs. I understood that I needed to create a service of my own like

2条回答
  •  有刺的猬
    2021-01-07 05:13

    Rename your processRecord method to __invoke. That makes LogProcessor instances callable, and you'll be able to pass the corresponding serice as a processor.

提交回复
热议问题