SLF4J Warning: Class Path Contains Multiple SLF4J Bindings 1. Overview When we use SLF4J in our applications, we sometimes see a warning message about multiple bindings in the classpath printed to the console. In this tutorial, we’ll try to understand why we see this message and how to resolve it.… Continue Reading slf4j-classpath-multiple-bindings

Spring Performance Logging 1. Overview In this tutorial, we’ll look into a couple of basic options the Spring Framework offers for performance monitoring. 2. PerformanceMonitorInterceptor A simple solution to get basic monitoring functionality for the execution time of our methods, we can make use of the PerformanceMonitorInterceptor class out of… Continue Reading spring-performance-logging

Show Hibernate/JPA SQL Statements from Spring Boot 1. Overview Spring JDBC and JPA provide abstractions over native JDBC APIs allowing developers to do away with native SQL queries. However, often we need to see those auto-generated SQL queries and the order in which they were executed for debugging purposes. In… Continue Reading sql-logging-spring-boot

Spring Boot Embedded Tomcat Logs 1. Introduction Spring Boot comes with an embedded Tomcat server, which is super-handy. However, we can’t see Tomcat’s logs by default. In this tutorial, we’ll learn how to configure Spring Boot to show Tomcat’s internal and access logs via a toy application. 2. Sample Application… Continue Reading spring-boot-embedded-tomcat-logs

Logging Spring WebClient Calls 1. Overview In this tutorial, we are going to show how to customize Spring’s WebClient – a reactive HTTP client – to log requests and responses. 2. WebClient WebClient is a reactive and non-blocking interface for HTTP requests, based on Spring WebFlux. It has a functional,… Continue Reading spring-log-webclient-calls

Logging HTTP Requests with Spring Boot Actuator HTTP Tracing 1. Introduction When we work with microservices or web services in general, it’s quite useful to know how our users interact with our services. This can be achieved by tracing all the requests that hit our services and collect this information… Continue Reading spring-boot-actuator-http