Monthly Archives: August 2016

Java: Custom logger factory that automatically infers the class name

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

Tagged with: ,
Posted in Java SE

Spring Boot: Show all logging events for one Web request only

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

Tagged with: ,
Posted in Spring

Spring Boot: Sessions actuator endpoint

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

Tagged with:
Posted in Spring

Spring Boot: Introduce your own insight endpoints

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”

Tagged with:
Posted in Spring

Spring Boot: Enhance your logging

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

Tagged with: ,
Posted in Java EE, Spring

Spring Boot: Enhance your thread dumps

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

Tagged with: ,
Posted in Java EE, Spring

Spring Boot: Custom auto-configuration JARs

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

Tagged with:
Posted in Spring