Home » Tag Archives: Logging

Tag Archives: Logging

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

spring-interview-questions-answers

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 »

Keeping Your Logs From Becoming an Unreadable Mess

When you run into a strange, seemingly unsolvable bug, improving your logging can be the best step you can take. Great logging is the easiest way to detect and fix entire classes of bugs. When you log enough information, you can see how your data changes during a request. You can track the calls you make to other services, and ...

Read More »

Java 8 Deferred Invocation with Java Util Logging

In the blog post Better Performing Non-Logging Logger Calls in Log4j2, I looked at approaches one can use in Log4j 2 to reduce or avoid invocation of methods in log statements that, based on the specified log level, are not actually logged at all. As part of this discussion, I covered Log4j 2‘s support for Java 8-based deferred execution using ...

Read More »