Log4j 2 + Spring MVC Integration

log4j-thumbnail

Log4j 2 provides simple solution to the integration of logging to the web applications. If you run servlet 3.0 web application, then there is no need for any configurations. The log4j context is initialized at the time of loading the web application. If you run the servlet 2.5 web application, there is configuration parameters to […]

Log4j 2 Example

log4j-thumbnail

This tutorial explains how to configure the Log4j 2 in your standalone application. Note that, this example will work only of your application is running as standalone. I will write another post for the web application configuration. The following steps explains how the Log4j 2 library loading the suitable configurations. Log4j will check the system […]

Log4j 2 Features

log4j-thumbnail

Log4j is the leading Java logging framework released a decade ago. The study shows that there is 4 percent of the total code is related to the logging messages. This gives the impression that a better logging framework is always good for a project performance. Log4j’s last major version 1.0 has been released couple of […]

What is SLF4J?

slf4j-logo

Logging is a common issue for development teams. And right now there are a lot of options on what exactly to use for logging in Java. The most famous frameworks are: Log4j, Logback, Commons-logging, java.util.logging. But what happens if we want to change a logging framework by another one, did we have to change the whole […]

Debug Logging in iPad

java-thumbnail

This article is based on iPad in Practice, to be published on Summer 2011. It is being reproduced here by permission from Manning Publications. Manning publishes MEAP (Manning Early Access Program,) eBooks and pBooks. MEAPs are sold exclusively through Manning.com. All pBook purchases include free PDF, mobi and epub. When mobile formats become available all […]

Basic steps to configure Log4j using xml and properties file

java-thumbnail

This example demonstrated how to configure Log4j setup using the Properties file and XML file. These are the two most widely used techniques for configuring the Log4j for your application. But, in the recent days configuring with properties files are considered to be old technique and recommended using XML. This example program uses simple standalone […]

Logging Messages using Java Logging API

java-thumbnail

The Logging API in Java enables Applications to log messages of some level which will be very useful for debugging purpose. Say, if a system fails for some reasons, then the reason can be easily traced out by looking at the information available in the log file. In this section, let us see an overview […]

Close
Please support the site
By clicking any of these buttons you help our site to get better