Apache Log4j 2 Tutorials
A simple log4j 2 hello world example.Tested with: Log4j 2.11.2, Maven 3, Java 8. Note: Apache Log4j 2, the fastest Java logging framework, provides significant improvements over its predecessor, Log4j…
Log4j hello world example
In this tutorial, we will show you how to use the classic log4j 1.2.x to log a debug or error message in a Java application.
Spring REST Error Handling Example
In this article, we will show you error handling in Spring Boot REST application. Technologies used :Spring Boot 2.1.2.RELEASE, Spring 5.1.4.RELEASE, Maven 3, Java 8
Spring Boot SLF4j Logback example
In this tutorial, we will show you how to use Logback in Spring Boot framework. Technologies used : Spring Boot 2.1.2.RELEASE, Spring 5.1.4.RELEASE, Logback 1.2.3, Maven 3, Java 8
Spring Boot β Show Hibernate SQL query
Add the following lines in application.properties to log the Hibernate SQL query. To show sql statement: logging.level.org.hibernate.SQL=debug . To show sql values: logging.level.org.hibernate.type.descriptor.sql=trace
Logback β Duplicate log messages
Review a simple Java application and log a message via Logback. Run above program, the Logback will logs a message twice? This is caused by the Appenders accumulate. To fix…
How to stop logback status INFO at the start of every log?
The logback will output its own status (INFO or WARN) at the start of the program, itβs really annoying! To fix it, add a NopStatusListener in logback.xml
Logback β Disable logging in Unit Test
While the unit test is running in the IDE, the Logback is showing a lot of configuration or status like this. It is really annoying, especially for the failed test,…