[GH-ISSUE #1686] Adding support for RFC 5424 levels in Logger::toMonologLevel #720

Closed
opened 2026-03-04 02:17:22 +03:00 by kerem · 1 comment
Owner

Originally created by @Seldaek on GitHub (Jun 11, 2022).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1686

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

Originally created by @Seldaek on GitHub (Jun 11, 2022). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1686 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
kerem 2026-03-04 02:17:22 +03:00
  • closed this issue
  • added the
    Feature
    label
Author
Owner

@lussoluca commented on GitHub (Jun 24, 2022):

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

<!-- gh-comment-id:1165309167 --> @lussoluca commented on GitHub (Jun 24, 2022): I agree with you, I can start working on this in the next days
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#720
No description provided.