Class Log4jLogEvent.Builder
- java.lang.Object
-
- org.apache.logging.log4j.core.impl.Log4jLogEvent.Builder
-
-
Method Summary
-
-
-
Constructor Detail
-
Builder
public Builder()
-
Builder
public Builder(LogEvent other)
-
-
Method Detail
-
setLevel
public Log4jLogEvent.Builder setLevel(Level level)
-
setLoggerFqcn
public Log4jLogEvent.Builder setLoggerFqcn(String loggerFqcn)
-
setLoggerName
public Log4jLogEvent.Builder setLoggerName(String loggerName)
-
setMarker
public Log4jLogEvent.Builder setMarker(Marker marker)
-
setMessage
public Log4jLogEvent.Builder setMessage(Message message)
-
setThrown
public Log4jLogEvent.Builder setThrown(Throwable thrown)
-
setTimeMillis
public Log4jLogEvent.Builder setTimeMillis(long timeMillis)
-
setInstant
public Log4jLogEvent.Builder setInstant(Instant instant)
-
setThrownProxy
public Log4jLogEvent.Builder setThrownProxy(ThrowableProxy thrownProxy)
-
setContextMap
@Deprecated public Log4jLogEvent.Builder setContextMap(Map<String,String> contextMap)
Deprecated.
-
setContextData
public Log4jLogEvent.Builder setContextData(StringMap contextData)
-
setContextStack
public Log4jLogEvent.Builder setContextStack(ThreadContext.ContextStack contextStack)
-
setThreadId
public Log4jLogEvent.Builder setThreadId(long threadId)
-
setThreadName
public Log4jLogEvent.Builder setThreadName(String threadName)
-
setThreadPriority
public Log4jLogEvent.Builder setThreadPriority(int threadPriority)
-
setSource
public Log4jLogEvent.Builder setSource(StackTraceElement source)
-
setIncludeLocation
public Log4jLogEvent.Builder setIncludeLocation(boolean includeLocation)
-
setEndOfBatch
public Log4jLogEvent.Builder setEndOfBatch(boolean endOfBatch)
-
setNanoTime
public Log4jLogEvent.Builder setNanoTime(long nanoTime)
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
public Log4jLogEvent build()
Description copied from interface:Builder
Builds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.
-
-