Home » Tag Archives: Logging

Tag Archives: Logging

Free eBook: The Complete Guide to Java Logging in Production

The Complete GitHub Logging Research: How the World’s Top Companies Choose How and What to Log We all use log files to monitor our applications in production. Some of us prefer using log management tools like Splunk or ELK, while others sift through raw logs on their notepad or terminal. It doesn’t matter if you choose the former or the ...

Read More »

5 Shocking Stats That Prove Logs Are Inadequate

We’re all guilty of logging malpractice. Don’t think so? These statistics might change your mind We won’t sit here and ask you questions with obvious answers like, do you use log files to monitor your application in production? We all use logs, and there can be useful information stored there if you know how to find it. But, logs are ...

Read More »

How to fix Exception in thread “main” java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory in Java

This error means your code or any external library you are using in your application is using the SLF4J library, an open source logging library, but it is not able to find the required JAR file e.g. slf4j-api-1.7.2.jar hence it’s throwing Exception in thread “main” java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory. If you look at the error, you will see that it’s saying it is not ...

Read More »

Log Unexpected Switch Options

There are many things a Java developer can do to make his or her own life and the lives of others maintaining that code easier. In this post, I’m going to look at a very easy approach a developer can take to make things easier for everyone. The point of this post will likely seem obvious to everyone reading it, ...

Read More »

Allocation free logging with log4j2

Introduction Recently I was working for a client trying to remove some GC pauses for a large well crafted Java system. After profiling I realised that most of the garbage was being produced by logging!! Was there a simple unobtrusive way to remove all that allocation?  Turns out there was :) Which framework should I use for GC free logging? ...

Read More »

An Overview of the Logging Ecosystem in 2017

Logging. It’s fair to say that it’s a fundamental tenet of modern computing. It helps developers debug applications, and systems administrators and DevOps staff debug server outages. Consequently, logs are critical for providing the information and context required to solve problems, both as they occur and to understand them from a historical context. But like anything in computing, the state ...

Read More »

Spring Boot – Configure Log Level in runtime using actuator endpoint


As of Spring Boot 1.5 a new loggers actuator endpoint allows viewing and changing application logging levels in runtime. Add spring-boot-actuator to your project <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> Disable security for loggers or for all endpoints Set either management.security.enabled to false or endpoints.loggers.sensitive to false to disable security. Note that the latter changes only loggers endpoint. Get all loggers details ...

Read More »