Log4J Features

Basic features of any logging library are:
1. Control over which logging statements are enabled or disabled - the Logger, the central class in the log4j package.
2. Manage output destinations - Appenders, there are appenders for files, the console, Unix Syslog, NT Event Log, remote servers, SMTP e-mail, etc.
3.Manage output format- Layouts, the most popular layouts are the PatternLayout and HTMLLayout.

As mentioned above Log4j has three main components: loggers, appenders and layouts.
1. public class Logger- Logger is responsible for handling the majority of log operations.
2. public interface Appender - Appender is responsible for controlling the output of log operations.
3. public abstract class Layout-Layout is responsible for formatting the output for Appender.

These three types of components work together to enable developers to log messages according to message type and level, and to control at runtime how these messages are formatted and where they are reported.


Log4j Features
Log4j Loggers
Log4j Appenders
Log4j Layouts
Log4j Levels
Log4j Installation
Log4j vs. JSR47
Pros & Cons of Log4j

Use of this website constitutes acceptance of the AllAppLabs.com Terms and Conditions