Package | Description |
---|---|
org.apache.logging.log4j |
Public API for Log4j 2.
|
org.apache.logging.log4j.core |
Implementation of Log4j 2.
|
org.apache.logging.log4j.core.async |
Provides Asynchronous Logger classes and interfaces for low-latency logging.
|
org.apache.logging.log4j.core.impl |
Log4j 2 private implementation classes.
|
org.apache.logging.log4j.spi |
Internal interfaces and classes to be used by authors of logging implementations or for internal use by
API classes.
|
Modifier and Type | Class and Description |
---|---|
private static class |
ThreadContext.EmptyThreadContextStack
An empty read-only ThreadContextStack.
|
Modifier and Type | Method and Description |
---|---|
static ThreadContext.ContextStack |
ThreadContext.cloneStack()
Returns a copy of this thread's stack.
|
ThreadContext.ContextStack |
ThreadContext.EmptyThreadContextStack.copy() |
ThreadContext.ContextStack |
ThreadContext.ContextStack.copy()
Returns a copy of the ContextStack.
|
static ThreadContext.ContextStack |
ThreadContext.getImmutableStack()
Gets an immutable copy of this current thread's context stack.
|
ThreadContext.ContextStack |
ThreadContext.EmptyThreadContextStack.getImmutableStackOrNull() |
ThreadContext.ContextStack |
ThreadContext.ContextStack.getImmutableStackOrNull()
Returns a ContextStack with the same contents as this ContextStack or
null . |
Modifier and Type | Method and Description |
---|---|
ThreadContext.ContextStack |
LogEvent.getContextStack()
Gets the context stack (also known as Nested Diagnostic Context or NDC).
|
ThreadContext.ContextStack |
AbstractLogEvent.getContextStack() |
Modifier and Type | Field and Description |
---|---|
private ThreadContext.ContextStack |
RingBufferLogEventTranslator.contextStack |
private ThreadContext.ContextStack |
RingBufferLogEvent.contextStack |
Modifier and Type | Method and Description |
---|---|
ThreadContext.ContextStack |
RingBufferLogEvent.getContextStack() |
Modifier and Type | Method and Description |
---|---|
void |
RingBufferLogEventTranslator.setBasicValues(AsyncLogger anAsyncLogger,
java.lang.String aLoggerName,
Marker aMarker,
java.lang.String theFqcn,
Level aLevel,
Message msg,
java.lang.Throwable aThrowable,
ThreadContext.ContextStack aContextStack,
java.lang.StackTraceElement aLocation,
Clock aClock,
NanoClock aNanoClock) |
void |
RingBufferLogEvent.setValues(AsyncLogger anAsyncLogger,
java.lang.String aLoggerName,
Marker aMarker,
java.lang.String theFqcn,
Level aLevel,
Message msg,
java.lang.Throwable aThrowable,
StringMap mutableContextData,
ThreadContext.ContextStack aContextStack,
long threadId,
java.lang.String threadName,
int threadPriority,
java.lang.StackTraceElement aLocation,
Clock clock,
NanoClock nanoClock) |
Modifier and Type | Field and Description |
---|---|
private ThreadContext.ContextStack |
MutableLogEvent.contextStack |
private ThreadContext.ContextStack |
Log4jLogEvent.contextStack |
private ThreadContext.ContextStack |
Log4jLogEvent.Builder.contextStack |
private ThreadContext.ContextStack |
Log4jLogEvent.LogEventProxy.contextStack |
Modifier and Type | Method and Description |
---|---|
ThreadContext.ContextStack |
MutableLogEvent.getContextStack() |
ThreadContext.ContextStack |
Log4jLogEvent.getContextStack()
Returns an immutable copy of the ThreadContext stack.
|
Modifier and Type | Method and Description |
---|---|
static Log4jLogEvent |
Log4jLogEvent.createEvent(java.lang.String loggerName,
Marker marker,
java.lang.String loggerFQCN,
Level level,
Message message,
java.lang.Throwable thrown,
ThrowableProxy thrownProxy,
java.util.Map<java.lang.String,java.lang.String> mdc,
ThreadContext.ContextStack ndc,
java.lang.String threadName,
java.lang.StackTraceElement location,
long timestamp)
Deprecated.
use
Log4jLogEvent.Builder instead. This method will be removed in an upcoming release. |
void |
MutableLogEvent.setContextStack(ThreadContext.ContextStack contextStack) |
Log4jLogEvent.Builder |
Log4jLogEvent.Builder.setContextStack(ThreadContext.ContextStack contextStack) |
Constructor and Description |
---|
Log4jLogEvent(java.lang.String loggerName,
Marker marker,
java.lang.String loggerFQCN,
Level level,
Message message,
java.lang.Throwable t,
java.util.Map<java.lang.String,java.lang.String> mdc,
ThreadContext.ContextStack ndc,
java.lang.String threadName,
java.lang.StackTraceElement location,
long timestampMillis)
Deprecated.
use
Log4jLogEvent.Builder instead. This constructor will be removed in an upcoming release. |
Log4jLogEvent(java.lang.String loggerName,
Marker marker,
java.lang.String loggerFQCN,
Level level,
Message message,
java.lang.Throwable thrown,
ThrowableProxy thrownProxy,
StringMap contextData,
ThreadContext.ContextStack contextStack,
long threadId,
java.lang.String threadName,
int threadPriority,
java.lang.StackTraceElement source,
Clock clock,
long nanoTime) |
Log4jLogEvent(java.lang.String loggerName,
Marker marker,
java.lang.String loggerFQCN,
Level level,
Message message,
java.lang.Throwable thrown,
ThrowableProxy thrownProxy,
StringMap contextData,
ThreadContext.ContextStack contextStack,
long threadId,
java.lang.String threadName,
int threadPriority,
java.lang.StackTraceElement source,
long nanoTime) |
Log4jLogEvent(java.lang.String loggerName,
Marker marker,
java.lang.String loggerFQCN,
Level level,
Message message,
java.lang.Throwable thrown,
ThrowableProxy thrownProxy,
StringMap contextData,
ThreadContext.ContextStack contextStack,
long threadId,
java.lang.String threadName,
int threadPriority,
java.lang.StackTraceElement source,
long timestampMillis,
int nanoOfMillisecond,
long nanoTime)
Constructor.
|
Modifier and Type | Interface and Description |
---|---|
interface |
ThreadContextStack
Service provider interface to implement custom NDC behavior for
ThreadContext . |
Modifier and Type | Class and Description |
---|---|
class |
DefaultThreadContextStack
A copy-on-write thread-safe variant of
org.apache.logging.log4j.spi.ThreadContextStack in which all mutative
operations (add, pop, and so on) are implemented by making a fresh copy of the underlying list. |
class |
MutableThreadContextStack
TODO
|
Modifier and Type | Method and Description |
---|---|
ThreadContext.ContextStack |
MutableThreadContextStack.getImmutableStackOrNull() |
ThreadContext.ContextStack |
DefaultThreadContextStack.getImmutableStackOrNull() |