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

Set handler formatter in FIlterHandler #1386

Closed
orlandothoeny opened this issue Oct 15, 2019 · 1 comment
Closed

Set handler formatter in FIlterHandler #1386

orlandothoeny opened this issue Oct 15, 2019 · 1 comment

Comments

@orlandothoeny
Copy link

orlandothoeny commented Oct 15, 2019

Currently the FilterHandler does not allow setting the formatter of the handler it uses.
Of course one could first set the formatter in the handler that should be used, then pass it to the FilterHandler.

However in my current use case it would be preferable if the FilterHandler would override the setFormatter method of the AbstractHandler. My current use case: Using the Monolog Drupal module to log Drupal log messages. I want to only log a range of levels. (Info - Warning to stdout, Error and up to stderr).
The Drupal Monolog module currently uses setFormatter to set a formatter.

Don't know if this is good design, maybe this should be handled by the Drupal module. Input appreciated.

--
Ah, I've just seen that the Drupal module uses the 1.x version of Monolog.
And that the FilterHandler does not implement FormattableHandlerInterface.

@orlandothoeny
Copy link
Author

PR #1387

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 a pull request may close this issue.

1 participant