Rodrigo Santellan
Rodrigo Santellan

Reputation: 225

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!

Upvotes: 5

Views: 2417

Answers (1)

Barkati.med
Barkati.med

Reputation: 630

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]

Upvotes: 5

Related Questions