Monthly Archive: August 2016

In this post I show how you can declare loggers like this: There is no argument to the MyLoggerFactory::getLogger method. Contrast that to the normal way to declare a logger: This is business as usual. But have you ever made that silly mistake where you copy/paste a class – and then, in the new class,… Continue Reading

In this post I show how you for a single Web request can make your Spring Boot application dump all log statements on all categories (TRACE, DEBUG, INFO, WARN, ERROR). Everything – but only for the specific Web request that you care about. I show the technique using Spring Boot 1.4. Here’s an example. Imagine a call… Continue Reading

This post shows how you can implement a custom Spring Boot Actuator endpoint that prints information about all active HttpSessions: HttpSession meta data is prefixed with @ signs: id, creation time and last accessed time. The other values are a raw dump of all the HttpSession attributes. You can use this endpoint during development to inspect active sessions.… Continue Reading

In this post I show how you can develop custom Spring Boot Actuator HTTP endpoints for obtaining detailed insight into your Spring Boot application’s runtime behavior. Here’s an example: The above output is simple. Yet it can be useful to have in many applications. Like the “official” Spring Boot Actuator info output. If you don’t find this concrete example interesting, then I’m sure… Continue Reading

In this post I show how you can tune your Spring Boot application’s logging output – such that it has even more information when you need to troubleshoot. The method is actually so generic that you can apply it to other types of Java applications as well – for example Java EE applications. What you have today… Continue Reading

In this post I show how you can add extra information to your applications’ thread dumps. I will use Spring Boot as an example environment – but the idea is very generic: You can, for example, easily apply this technique to any other Java EE application server environment you may have. Here is an example of an enhanced thread dump output (out of… Continue Reading

Custom auto-configuration JAR: A shared JAR module containing Spring beans that can be automatically activated in one or more Spring Boot applications. Auto-configuration JARs are extensively used by the official Spring Boot starter modules you are using in your every-day Spring Boot applications. But did you know that you easily can create such functionality yourself too? Here’s how to do… Continue Reading