At the moment to define the log level for an handler an user have to specify the numeric value:

monolog.handler.rotating_file_error:
        class: Monolog\Handler\RotatingFileHandler
        arguments:
            - 'public://logs/error.log'
            - 10
            - '400'

It would be more useful if we define some container parameters for those values:

monolog.handler.rotating_file_error:
        class: Monolog\Handler\RotatingFileHandler
        arguments:
            - 'public://logs/error.log'
            - 10
            - '%monolog.level.error%'
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lussoluca created an issue. See original summary.

lussoluca’s picture

Title: Define container parameters for loggin levels » Define container parameters for logging levels
lussoluca’s picture

lussoluca’s picture

Status: Active » Needs review

  • lussoluca committed 915a88f on 8.x-1.x
    Issue #2885800 by lussoluca: Define container parameters for logging...
lussoluca’s picture

Status: Needs review » Fixed

Committed and pushed to 8.x-1.x

lussoluca’s picture

Status: Fixed » Closed (fixed)