Top Description Fields Constructors Methods
org.apache.logging.log4j.internal

public Class DefaultLogBuilder

extends Object
implements BridgeAware, LogBuilder
Class Inheritance
All Implemented Interfaces
org.apache.logging.log4j.LogBuilder, org.apache.logging.log4j.BridgeAware
Imports
java.util.Arrays, org.apache.logging.log4j.BridgeAware, .Level, .LogBuilder, .Logger, .Marker, org.apache.logging.log4j.message.Message, .SimpleMessage, org.apache.logging.log4j.spi.ExtendedLogger, org.apache.logging.log4j.status.StatusLogger, org.apache.logging.log4j.util.LambdaUtil, .StackLocatorUtil, .Supplier

Collects data for a log event and then logs it. This class should be considered private.

Field Summary

Modifier and TypeField and Description
private static Message
private static final String
private String
private volatile boolean
private Level
private StackTraceElement
private static final Logger
private ExtendedLogger
private Marker
private long
private Throwable

Constructor Summary

AccessConstructor and Description
public
DefaultLogBuilder(final ExtendedLogger logger, final Level level)

public

Method Summary

Modifier and TypeMethod and Description
protected boolean
isEnabled(Message message)

protected boolean
protected boolean
isEnabled(String message)

protected boolean
isEnabled(String message, Object... params)

protected boolean
isEnabled(Object message)

protected boolean
isEnabled(String message, Object p0)

protected boolean
isEnabled(String message, Object p0, Object p1)

protected boolean
isEnabled(String message, Object p0, Object p1, Object p2)

protected boolean
isEnabled(String message, Object p0, Object p1, Object p2, Object p3)

protected boolean
isEnabled(String message, Object p0, Object p1, Object p2, Object p3, Object p4)

protected boolean
isEnabled(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5)

protected boolean
isEnabled(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6)

protected boolean
isEnabled(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7)

protected boolean
isEnabled(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8)

protected boolean
isEnabled(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9)

public boolean
private boolean
public void
log(Message
The message to log.
message
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Causes all the data collected to be logged along with the message.

public void
log(final CharSequence
The message to log.
message
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Causes all the data collected to be logged along with the message.

public void
log(String
The message to log.
message
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Causes all the data collected to be logged along with the message.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object...
parameters to the message.
params
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log(String
The message.
message
,
Supplier<?>...
Parameters to the message.
params
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

References Deprecated Supplier is deprecated or references (maybe indirectly) at least one deprecated element.

Causes all the data collected to be logged along with the message and parameters.

public void
log(final Supplier<Message>
The supplier of the message to log.
messageSupplier
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

References Deprecated Supplier is deprecated or references (maybe indirectly) at least one deprecated element.

Causes all the data collected to be logged along with the message.

public void
log(Object
The message to log.
message
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Causes all the data collected to be logged along with the message.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object
parameter to the message.
p0
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object
parameter to the message.
p0
,
Object
parameter to the message.
p1
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object
parameter to the message.
p0
,
Object
parameter to the message.
p1
,
Object
parameter to the message.
p2
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object
parameter to the message.
p0
,
Object
parameter to the message.
p1
,
Object
parameter to the message.
p2
,
Object
parameter to the message.
p3
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object
parameter to the message.
p0
,
Object
parameter to the message.
p1
,
Object
parameter to the message.
p2
,
Object
parameter to the message.
p3
,
Object
parameter to the message.
p4
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object
parameter to the message.
p0
,
Object
parameter to the message.
p1
,
Object
parameter to the message.
p2
,
Object
parameter to the message.
p3
,
Object
parameter to the message.
p4
,
Object
parameter to the message.
p5
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object
parameter to the message.
p0
,
Object
parameter to the message.
p1
,
Object
parameter to the message.
p2
,
Object
parameter to the message.
p3
,
Object
parameter to the message.
p4
,
Object
parameter to the message.
p5
,
Object
parameter to the message.
p6
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object
parameter to the message.
p0
,
Object
parameter to the message.
p1
,
Object
parameter to the message.
p2
,
Object
parameter to the message.
p3
,
Object
parameter to the message.
p4
,
Object
parameter to the message.
p5
,
Object
parameter to the message.
p6
,
Object
parameter to the message.
p7
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object
parameter to the message.
p0
,
Object
parameter to the message.
p1
,
Object
parameter to the message.
p2
,
Object
parameter to the message.
p3
,
Object
parameter to the message.
p4
,
Object
parameter to the message.
p5
,
Object
parameter to the message.
p6
,
Object
parameter to the message.
p7
,
Object
parameter to the message.
p8
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log(String
the message to log; the format depends on the message factory.
message
,
Object
parameter to the message.
p0
,
Object
parameter to the message.
p1
,
Object
parameter to the message.
p2
,
Object
parameter to the message.
p3
,
Object
parameter to the message.
p4
,
Object
parameter to the message.
p5
,
Object
parameter to the message.
p6
,
Object
parameter to the message.
p7
,
Object
parameter to the message.
p8
,
Object
parameter to the message.
p9
)

Overrides default org.apache.logging.log4j.LogBuilder.log.

Logs a message with parameters.

public void
log()

Overrides default org.apache.logging.log4j.LogBuilder.log.

Causes all the data collected to be logged.

public Message
logAndGet(final Supplier<Message>
The supplier of the message to log.
messageSupplier
)

Overrides default org.apache.logging.log4j.LogBuilder.logAndGet.

References Deprecated Supplier is deprecated or references (maybe indirectly) at least one deprecated element.

Causes all the data collected to be logged along with the message.

private void
public LogBuilder

Returns:

This LogBuilder instance.
reset
(final ExtendedLogger logger, final Level
The logging level for this event.
level
)

This method should be considered internal.

public void
setEntryPoint(final String
fully qualified class name
fqcn
)

Implements org.apache.logging.log4j.BridgeAware.setEntryPoint.

To set fully qualified class name of the entry point to the logging system.

public LogBuilder
withLocation()

Overrides default org.apache.logging.log4j.LogBuilder.withLocation.

An implementation will calculate the caller's stack frame and include it in the log event.

public LogBuilder
withLocation(StackTraceElement
The stack trace element to include in the log event.
location
)

Overrides default org.apache.logging.log4j.LogBuilder.withLocation.

Adds the specified stack trace element to the log event.

public LogBuilder
withMarker(final Marker
The Marker to log.
marker
)

Overrides default org.apache.logging.log4j.LogBuilder.withMarker.

Includes a Marker in the log event.

public LogBuilder
withThrowable(final Throwable
The Throwable to log.
throwable
)

Overrides default org.apache.logging.log4j.LogBuilder.withThrowable.

Includes a Throwable in the log event.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait