diff --git a/cookbook/logging/monolog_email.rst b/cookbook/logging/monolog_email.rst index e51b3afea49..a609b4b5200 100644 --- a/cookbook/logging/monolog_email.rst +++ b/cookbook/logging/monolog_email.rst @@ -19,7 +19,12 @@ it is broken down. handlers: mail: 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_404: + # - ^/ handler: buffered buffered: type: buffer @@ -48,6 +53,12 @@ it is broken down. type="fingers_crossed" action-level="critical" handler="buffered" + /> array( 'type' => 'fingers_crossed', 'action_level' => 'critical', + // to also log 400 level errors (but not 404's): + // 'action_level' => 'error', + // 'excluded_404s' => array( + // '^/', + // ), 'handler' => 'buffered', ), 'buffered' => array( @@ -108,7 +124,8 @@ setting means that the output is then passed onto the ``buffered`` handler. .. tip:: If you want both 400 level and 500 level errors to trigger an email, - set the ``action_level`` to ``error`` instead of ``critical``. + set the ``action_level`` to ``error`` instead of ``critical``. See the + code above for an example. The ``buffered`` handler simply keeps all the messages for a request and then passes them onto the nested handler in one go. If you do not use this