Package | Description |
---|---|
org.apache.log4j.bridge | |
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 | Method and Description |
---|---|
ThreadContext.ContextStack |
LogEventWrapper.getContextStack() |
Modifier and Type | Method and Description |
---|---|
static ThreadContext.ContextStack |
ThreadContext.cloneStack()
Returns a copy of this thread's stack.
|
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.ContextStack.getImmutableStackOrNull()
Returns a ContextStack with the same contents as this ContextStack or
null . |
Modifier and Type | Method and Description |
---|---|
ThreadContext.ContextStack |
AbstractLogEvent.getContextStack() |
ThreadContext.ContextStack |
LogEvent.getContextStack()
Gets the context stack (also known as Nested Diagnostic Context or NDC).
|
Modifier and Type | Method and Description |
---|---|
ThreadContext.ContextStack |
RingBufferLogEvent.getContextStack() |
Modifier and Type | Method and Description |
---|---|
void |
RingBufferLogEventTranslator.setBasicValues(AsyncLogger anAsyncLogger,
String aLoggerName,
Marker aMarker,
String theFqcn,
Level aLevel,
Message msg,
Throwable aThrowable,
ThreadContext.ContextStack aContextStack,
StackTraceElement aLocation,
Clock aClock,
NanoClock aNanoClock) |
void |
RingBufferLogEvent.setValues(AsyncLogger anAsyncLogger,
String aLoggerName,
Marker aMarker,
String theFqcn,
Level aLevel,
Message msg,
Throwable aThrowable,
StringMap mutableContextData,
ThreadContext.ContextStack aContextStack,
long threadId,
String threadName,
int threadPriority,
StackTraceElement aLocation,
Clock clock,
NanoClock nanoClock) |
Modifier and Type | Method and Description |
---|---|
ThreadContext.ContextStack |
Log4jLogEvent.getContextStack()
Returns an immutable copy of the ThreadContext stack.
|
ThreadContext.ContextStack |
MutableLogEvent.getContextStack() |
Modifier and Type | Method and Description |
---|---|
static Log4jLogEvent |
Log4jLogEvent.createEvent(String loggerName,
Marker marker,
String loggerFQCN,
Level level,
Message message,
Throwable thrown,
ThrowableProxy thrownProxy,
Map<String,String> mdc,
ThreadContext.ContextStack ndc,
String threadName,
StackTraceElement location,
long timestamp)
Deprecated.
use
Log4jLogEvent.Builder instead. This method will be removed in an upcoming release. |
Log4jLogEvent.Builder |
Log4jLogEvent.Builder.setContextStack(ThreadContext.ContextStack contextStack) |
void |
MutableLogEvent.setContextStack(ThreadContext.ContextStack contextStack) |
Constructor and Description |
---|
Log4jLogEvent(String loggerName,
Marker marker,
String loggerFQCN,
Level level,
Message message,
Throwable t,
Map<String,String> mdc,
ThreadContext.ContextStack ndc,
String threadName,
StackTraceElement location,
long timestampMillis)
Deprecated.
use
Log4jLogEvent.Builder instead. This constructor will be removed in an upcoming release. |
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() |
Copyright © 1999-2023 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.