public static class Log4jLogEvent.Builder extends java.lang.Object implements Builder<LogEvent>
Modifier and Type | Field and Description |
---|---|
private StringMap |
contextData |
private ThreadContext.ContextStack |
contextStack |
private boolean |
endOfBatch |
private boolean |
includeLocation |
private MutableInstant |
instant |
private Level |
level |
private java.lang.String |
loggerFqcn |
private java.lang.String |
loggerName |
private Marker |
marker |
private Message |
message |
private long |
nanoTime |
private java.lang.StackTraceElement |
source |
private long |
threadId |
private java.lang.String |
threadName |
private int |
threadPriority |
private java.lang.Throwable |
thrown |
private ThrowableProxy |
thrownProxy |
private java.lang.String loggerFqcn
private Marker marker
private Level level
private java.lang.String loggerName
private Message message
private java.lang.Throwable thrown
private MutableInstant instant
private ThrowableProxy thrownProxy
private StringMap contextData
private ThreadContext.ContextStack contextStack
private long threadId
private java.lang.String threadName
private int threadPriority
private java.lang.StackTraceElement source
private boolean includeLocation
private boolean endOfBatch
private long nanoTime
public Builder()
public Builder(LogEvent other)
public Log4jLogEvent.Builder setLevel(Level level)
public Log4jLogEvent.Builder setLoggerFqcn(java.lang.String loggerFqcn)
public Log4jLogEvent.Builder setLoggerName(java.lang.String loggerName)
public Log4jLogEvent.Builder setMarker(Marker marker)
public Log4jLogEvent.Builder setMessage(Message message)
public Log4jLogEvent.Builder setThrown(java.lang.Throwable thrown)
public Log4jLogEvent.Builder setTimeMillis(long timeMillis)
public Log4jLogEvent.Builder setInstant(Instant instant)
public Log4jLogEvent.Builder setThrownProxy(ThrowableProxy thrownProxy)
@Deprecated public Log4jLogEvent.Builder setContextMap(java.util.Map<java.lang.String,java.lang.String> contextMap)
public Log4jLogEvent.Builder setContextData(StringMap contextData)
public Log4jLogEvent.Builder setContextStack(ThreadContext.ContextStack contextStack)
public Log4jLogEvent.Builder setThreadId(long threadId)
public Log4jLogEvent.Builder setThreadName(java.lang.String threadName)
public Log4jLogEvent.Builder setThreadPriority(int threadPriority)
public Log4jLogEvent.Builder setSource(java.lang.StackTraceElement source)
public Log4jLogEvent.Builder setIncludeLocation(boolean includeLocation)
public Log4jLogEvent.Builder setEndOfBatch(boolean endOfBatch)
public Log4jLogEvent.Builder setNanoTime(long nanoTime)
nanoTime
- The value of the running Java Virtual Machine's high-resolution time source when the event
was created.public Log4jLogEvent build()
Builder
private void initTimeFields()