Class Log4jLogEvent.Builder
java.lang.Object
org.apache.logging.log4j.core.impl.Log4jLogEvent.Builder
- Enclosing class:
Log4jLogEvent
LogEvent Builder helper class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringMapprivate ThreadContext.ContextStackprivate booleanprivate booleanprivate final MutableInstantprivate Levelprivate Stringprivate Stringprivate Markerprivate Messageprivate longprivate StackTraceElementprivate longprivate Stringprivate intprivate Throwableprivate ThrowableProxy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the object after all configuration has been set.private voidsetContextData(StringMap contextData) setContextMap(Map<String, String> contextMap) Deprecated.setContextStack(ThreadContext.ContextStack contextStack) setEndOfBatch(boolean endOfBatch) setIncludeLocation(boolean includeLocation) setInstant(Instant instant) setLoggerFqcn(String loggerFqcn) setLoggerName(String loggerName) setMessage(Message message) setNanoTime(long nanoTime) Sets the nano time for the event.setSource(StackTraceElement source) setThreadId(long threadId) setThreadName(String threadName) setThreadPriority(int threadPriority) setThrownProxy(ThrowableProxy thrownProxy) setTimeMillis(long timeMillis)
-
Field Details
-
loggerFqcn
-
marker
-
level
-
loggerName
-
message
-
thrown
-
instant
-
thrownProxy
-
contextData
-
contextStack
-
threadId
private long threadId -
threadName
-
threadPriority
private int threadPriority -
source
-
includeLocation
private boolean includeLocation -
endOfBatch
private boolean endOfBatch -
nanoTime
private long nanoTime
-
-
Constructor Details
-
Builder
public Builder() -
Builder
-
-
Method Details
-
setLevel
-
setLoggerFqcn
-
setLoggerName
-
setMarker
-
setMessage
-
setThrown
-
setTimeMillis
-
setInstant
-
setThrownProxy
-
setContextMap
Deprecated. -
setContextData
-
setContextStack
-
setThreadId
-
setThreadName
-
setThreadPriority
-
setSource
-
setIncludeLocation
-
setEndOfBatch
-
setNanoTime
Sets the nano time for the event.- Parameters:
nanoTime- The value of the running Java Virtual Machine's high-resolution time source when the event was created.- Returns:
- this builder
-
build
Description copied from interface:BuilderBuilds the object after all configuration has been set. This will use default values for any unspecified attributes for the object. -
initTimeFields
private void initTimeFields()
-