
Setting Up Error Monitoring in Laravel Without the Overhead
It's 2:17am and someone on X (man I miss it being Twitter) is telling me my app is broken. Not how it's broken, mind you. Just a screenshot of a white page and "hey your thing is dead lol". So now I'm SSH'd into a server, running tail -f storage/logs/laravel.log , scrolling through thousands of lines of interleaved garbage — deprecation warnings I've been ignoring for months, some debug output I forgot to remove, and somewhere in there, presumably, the actual error that's causing a 500 for this person. I find it eventually. A null pointer on a relationship I forgot to eager load. Fifteen minutes of log archaeology for something that would've taken two seconds if I'd had any kind of monitoring set up. This was like three years ago. I'd love to tell you I fixed it the next day. I didn't. The Log::error() era Here's what I did instead, and I suspect you've done the same thing. I sprinkled Log::error() calls in strategic places. I set up a Slack webhook that fired on 500 responses. I told
Continue reading on Dev.to
Opens in a new tab

