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

Support for processors per handler. #43

Merged
merged 1 commit into from
Jan 4, 2016

Conversation

jessmchung
Copy link
Contributor

@rantonmattei @mortaliorchard Please review.

This enables users to specify processors on the handler level (which gets run after logger-level specified processors are run). Elaborating on the README's sample usage for configuration yml file, for git_processor would be:

formatters:
    dashed:
        class: Monolog\Formatter\LineFormatter
        format: "%datetime%-%channel%.%level_name% - %message%\n"
handlers:
    console:
        class: Monolog\Handler\StreamHandler
        level: DEBUG
        formatter: dashed
        stream: php://stdout
    info_file_handler:
        class: Monolog\Handler\StreamHandler
        level: INFO
        formatter: dashed
        stream: ./example_info.log
        processors: [git_processor]
processors:
    web_processor:
        class: Monolog\Processor\WebProcessor
   git_processor:
       class: Monolog\Processor\GitProcessor
loggers:
    myLogger:
        handlers: [console, info_file_handler]
        processors: [web_processor]

@rantonmattei
Copy link
Contributor

In your sample Yaml, the key would be processors, but no worries I will update the ReadMe once this is out.

@rantonmattei
Copy link
Contributor

Looks good to me. I'm trying to see where the code coverage decreased but coveralls does not cooperate...

// Empty function
};
$options = array(
'processors' => array('test_processor_1')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was a typo here before 'formatter' instead of 'processors'...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@rantonmattei
Copy link
Contributor

Looks good!

rantonmattei added a commit that referenced this pull request Jan 4, 2016
Support for processors per handler.
@rantonmattei rantonmattei merged commit 9ececef into theorchard:master Jan 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants