My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Links

Overview

This project is a simple and lightweight Java logging facade library that can be used as a logging abstraction layer. Any Java application or existing library using esl4j can seamlessly integrate with the underlying logging framework with no-code-change. It is also very easy and simple to plug and use any logging framework in Java applications.

The core esl4j API doesn't have a dependency on any thirdparty library, which makes it very lightweight.


esl4j artifacts are available in maven central repository


Usage

Here is all that one needs to do in the code.

   //Get a Logger instance
   Logger logger = LogManager.getLogger(MyClass.class);

   //Start logging
   logger.info("Hello world");

Configuration

Here is the one-line configuration to use the JDK logging framework.

   org.xeustechnologies.esl4j.LogFactory=org.xeustechnologies.esl4j.impl.JdkLogFactory

This configuration is put in a "esl4j.properties" file at the CLASSPATH root.

It is also possible to pass the LogFactory implementation as a JVM "-D" argument as follows:

   -Dorg.xeustechnologies.esl4j.LogFactory=org.xeustechnologies.esl4j.impl.JdkLogFactory

And programmatically as follows:

   LogManager.setFactory(new JdkLogFactory());

Implementations

esl4j includes a few LogFactory implementations to the popular logging frameworks and other platforms; support for more frameworks can also be added by simply implementing the LogFactory interface.

At present, esl4j has support for the following frameworks. To use the implementation just download the appropriate factory jar file and include it in the application's classpath:

Motivation behind the project

A simple, lightweight, to-the-point, and no-nonsense java logging facade that can be used in reusable java libraries and APIs for seamless integration with the application's underlying logging framework.

Projects using esl4j

Powered by Google Project Hosting