[GH-ISSUE #1365] Get severity level via Processor #569

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

Originally created by @LeftPinkie on GitHub (Aug 23, 2019).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/1365

Is there a way to get the severity level via a processor? I would like to create a custom processor where:

$entry[ 'extra' ][ 'severity' ] = [ DEBUG (100) | INFO (200) | NOTICE (250) | WARNING (300) | ERROR (400) | CRITICAL (500) | ALERT (550) | EMERGENCY (600) ]
Originally created by @LeftPinkie on GitHub (Aug 23, 2019). Original GitHub issue: https://github.com/Seldaek/monolog/issues/1365 Is there a way to get the severity level via a processor? I would like to create a custom processor where: ``` $entry[ 'extra' ][ 'severity' ] = [ DEBUG (100) | INFO (200) | NOTICE (250) | WARNING (300) | ERROR (400) | CRITICAL (500) | ALERT (550) | EMERGENCY (600) ] ```
kerem closed this issue 2026-03-04 02:16:03 +03:00
Author
Owner

@Seldaek commented on GitHub (Aug 23, 2019):

The severity name is available as level_name on the record already. You can take it from there and put it in extra, or use %level_name% in LineFormatter to get it in the logs

<!-- gh-comment-id:524286324 --> @Seldaek commented on GitHub (Aug 23, 2019): The severity name is available as level_name on the record already. You can take it from there and put it in extra, or use %level_name% in LineFormatter to get it in the logs
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#569
No description provided.