Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] support action_level configuration #40305

Merged
merged 3 commits into from
Jan 7, 2022
Merged

[8.x] support action_level configuration #40305

merged 3 commits into from
Jan 7, 2022

Commits on Jan 7, 2022

  1. chore (logging): support action_level configuration

    Enable the usage of the action_level configuration for log channels. When the action_level configuration is used the choosen handler by the developer will be wrapped in a Fingerscrossed handler.
    
    The Fingerscrossed handler will buffer all log records that are at or above the provided level configuration. Only when a log record is provided at or above the action_level all the buffered records will be flushed to the log itself.
    
    This methodology helps developers to gather debug information about a process while only logging that debug information if the code hits for example a critical error.
    
    @see https://github.com/Seldaek/monolog/blob/main/src/Monolog/Handler/FingersCrossedHandler.php
    @see https://symfony.com/doc/current/logging.html#handlers-that-modify-log-entries
    Wim Ulkeman committed Jan 7, 2022
    Configuration menu
    Copy the full SHA
    95c7686 View commit details
    Browse the repository at this point in the history
  2. fix (test): support older Monolog version

    Support checking the wrapped handler in older Monolog versions (pre 1.x). In the older versions the getHandler method was not yet available. The handler was only set as a protected property.
    Wim Ulkeman committed Jan 7, 2022
    Configuration menu
    Copy the full SHA
    f54ed04 View commit details
    Browse the repository at this point in the history
  3. formatting

    taylorotwell committed Jan 7, 2022
    Configuration menu
    Copy the full SHA
    508891b View commit details
    Browse the repository at this point in the history