Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony log deprecated warning on new file

I want to log only the deprecated warnings to a new file. But I can't see how to achieve that with monolog. Is there a custom configuration?

Thanks in advance!

like image 217
Rodrigo Santellan Avatar asked Jun 12 '17 12:06

Rodrigo Santellan


1 Answers

All Deprecated Message are logged As INFO level, php Channels so if You try this configuration All deprecation message will be logged in one file

monolog:
    handlers:
        security:
            level:    INFO
            type:     stream
            path:     '%kernel.logs_dir%/deprecated.log'
            channels: [php]
like image 134
Barkati.med Avatar answered Oct 03 '22 03:10

Barkati.med