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

Adding support for RFC 5424 levels in Logger::toMonologLevel #1686

Closed
Seldaek opened this issue Jun 11, 2022 · 1 comment
Closed

Adding support for RFC 5424 levels in Logger::toMonologLevel #1686

Seldaek opened this issue Jun 11, 2022 · 1 comment
Labels
Milestone

Comments

@Seldaek
Copy link
Owner

Seldaek commented Jun 11, 2022

We could support this which would alleviate the need for hacks like https://git.drupalcode.org/project/monolog/-/blob/2.x/src/Logger/Logger.php#L29-50

The numbers do not conflict with the monolog level constants, so this should be fine.

In 3.x we could also have a method on Monolog\Level to turn a case back into a RFC 5424 level.

/cc @lussoluca any opinion from Drupal Monolog side? I think it'd be great to remove the need for overriding methods as it would prevent problems like #1684

@lussoluca
Copy link
Contributor

I agree with you, I can start working on this in the next days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants