0

I am using sample config from symfony documentation page to send logs via email https://symfony.com/doc/2.8/logging/monolog_email.html

monolog:
handlers:
    main:
        type:         fingers_crossed
        # 500 errors are logged at the critical level
        action_level: critical
        # to also log 400 level errors (but not 404's):
        # action_level: error
        # excluded_404s:
        #     - ^/
        handler:      deduplicated
    deduplicated:
        type:    deduplication
        handler: swift
    swift:
        type:       swift_mailer
        from_email: 'error@example.com'
        to_email:   'error@example.com'
        subject:    'An Error Occurred! %%message%%'
        level:      debug
        formatter:  monolog.formatter.html
        content_type: text/html

I am getting an error Invalid handler type "deduplication" given for handler "deduplicated"

I am not sure what's wrong as i am doing exactly same as in documentation, or i have to configure something.

1 Answers1

0

Related to the Github-Repository there is indeed no option "deduplication" for the type.

https://github.com/symfony/monolog-bundle/blob/2.8.1/DependencyInjection/MonologExtension.php

Just upgrade your version via composer.

Jim Panse
  • 2,220
  • 12
  • 34