Answer the question
In order to leave comments, you need to log in
Logging to different Slack channels in Laravel?
Laravel has the ability to send logs to Slack. To do this, you need to specify which logs (error level) to send and create a webhook in slack.
It would be convenient to send errors of different levels to different channels. I didn't find it in the documentation. Does anyone know if this functionality exists?
Answer the question
In order to leave comments, you need to log in
Looks like something like this?
'channels' => [
'slack-critical' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_CRITICAL_WEBHOOK_URL'),
'username' => 'Laravel critical',
'emoji' => ':boom:',
'level' => 'critical',
],
'slack-debug' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_DEBUG_WEBHOOK_URL'),
'username' => 'Laravel debug',
'level' => 'debug',
],
],
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question