How to remove all php.INFO logs from Symfony 4 logs in production?

Viewed 1237

I'm struggling to configure monolog properly.

I keep receiving these messages in my /var/logs/prod.log

2020-04-02 18:26:01] php.INFO: User Deprecated: Using the "templating" service is deprecated since version 4.3 and will be removed in 5.0; use Twi....

[2020-04-02 18:26:01] php.INFO: User Deprecated: The "twig.exception_listener" service is deprecated since Symfony 4.4. {"exception":"[object] (Err...

[2020-04-02 18:26:01] php.INFO: User Deprecated: The "Symfony\Component\HttpKernel\EventListener\ExceptionListener" class is deprecated since Symfo....

Despite setting up the minimum level to error, it only seems to work for app.* type of logs and not php.*

Here is my prod/monolog.yaml

monolog:
    handlers:
        main:
            type: fingers_crossed
            action_level: warning
            handler: nested
            excluded_http_codes: [404, 405]
        nested:
            type: stream
            path: "%kernel.logs_dir%/%kernel.environment%.log"
            level: warning
        console:
            type: console
            process_psr_3_messages: false
            channels: ["!event", "!doctrine"]
        deprecation:
            type: stream
            path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
        deprecation_filter:
            type: filter
            handler: deprecation
            max_level: info
            channels: ["php"]

And in my framework.yaml I also have this bit of code:

framework:
    php_errors:
        log: true

Thank you

0 Answers
Related