Just because we do something one way, doesn’t always mean it is the right way … or even the best way.

As long as I can remember, I’ve included log messages in my code to provide run-time insight into what the code is really doing. From developers running locally all the way to the eyes of a production support engineer, these extra lines of code are meant to help troubleshoot unexpected scenarios.

The problem with this approach is that the entire process seems a bit off. Something unexpected happens, so we struggle to locate the root cause using some logging solution, tracing the log messages and stack trace backwards trying to determine where the reality differed from the expectations. This can take a lot of effort and time — and all at the price of impatient customers (both internal and external) wondering why things are not working properly.

#debugging #spring #java #logging #rollbar

You Can Log Better — How to Implement Real-Time Application Monitoring
1.10 GEEK