Top Description Interfaces Classes
[default module]

Package org.apache.logging.log4j

Annotations
@Export
@Version:2.20.2
Imports
org.osgi.annotation.bundle.Export, org.osgi.annotation.versioning.Version

Public API for Log4j 2.

The main entry point into Log4j is the org.apache.logging.log4j.LogManager class which can be used to obtain org.apache.logging.log4j.Logger objects, the current org.apache.logging.log4j.spi.LoggerContext, a new LoggerContext, and the current org.apache.logging.log4j.spi.LoggerContextFactory.

org.apache.logging.log4j.Marker objects can be obtained through the org.apache.logging.log4j.MarkerManager. The MDC (Mapped Diagnostic Context) can be used through the org.apache.logging.log4j.ThreadContext class.

See Also
Log4j 2 API manual

Interface Summary

Modifier and TypeInterface and Description
public interface
BridgeAware

Extended interface to allow bridges between logging systems to convey the correct location information.

public interface
LogBuilder

Interface for constructing log events before logging them.

public interface
Logger

This is the central interface in the log4j package.

public interface
Marker

Markers are objects that are used to add easily filterable information to log messages.

Class Summary

Modifier and TypeClass and Description
public class
CloseableThreadContext

Adds entries to the stack or map and them removes them when the object is closed, e.g. as part of a try-with-resources.

public class
EventLogger

Logs "Events" that are represented as StructuredDataMessage.

public class
Level

Levels used for identifying the severity of an event.

public class
LoggingException

Exception thrown when an error occurs while logging.

public class
LogManager

The anchor point for the Log4j logging system.

public class
MarkerManager

Applications create Markers by using the Marker Manager.

public class
ThreadContext

The ThreadContext allows applications to store information either in a Map or a Stack.