[GH-ISSUE #871] SlackHandler, how to print the value of $record['message'] #345

Closed
opened 2026-03-04 02:14:17 +03:00 by kerem · 0 comments
Owner

Originally created by @riccardomessineo on GitHub (Oct 14, 2016).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/871

I am using Monolog in Lumen. I can't figure out how to get just the message of error... i think the problem is here:

        if ($this->formatter) {
            $message = $this->formatter->format($record);
        } else {
            $message = $record['message'];
        }

$this->formatter is never empty... I tried pushing a null formatter, but it doesn't work.
Any ideas?

Originally created by @riccardomessineo on GitHub (Oct 14, 2016). Original GitHub issue: https://github.com/Seldaek/monolog/issues/871 I am using Monolog in Lumen. I can't figure out how to get just the message of error... i think the problem is here: ``` php if ($this->formatter) { $message = $this->formatter->format($record); } else { $message = $record['message']; } ``` $this->formatter is never empty... I tried pushing a null formatter, but it doesn't work. Any ideas?
kerem closed this issue 2026-03-04 02:14:18 +03:00
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#345
No description provided.