Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

EliW's avatar
Level 1

Can you configure Laravel to send Exceptions/Errors to another Logging Channel?

So the Laravel Logging capabilities are really nice with the ability to create various channels, and send logs to multiple channels, or not, either by log level and/or by explicitly calling the channel. IE: Log::channel('debugging')->error('asdf')

But I feel like I'm missing a fairly straight forward thing that I am expecting to find. Which is how to configure Laravel to send the Exception/Error reports, to a different channel than the default one. IE: So that an exception goes to say a new channel named 'exceptions' instead of the default. While Log::warn('something') would still go to the default channel.

Is there not a way to do this?

0 likes
4 replies
EliW's avatar
Level 1

@martinbean Hey Martin, thanks, I definitely know how to write to a specific channel. But that's when you are manually logging. Any unhandled exception or PHP error that happens, appears to be being thrown automatically into the 'default' channel though. What I was hoping to do was to tell Laravel that all exceptions would head to an 'exceptions' channel (or whatever I configured) instead.

1 like
martinbean's avatar

@EliW Then change your default logging channel to whatever you want it to be?

Please or to participate in this conversation.