public class DefaultLogBuilder extends Object implements BridgeAware, LogBuilder
NOOP| Constructor and Description |
|---|
DefaultLogBuilder() |
DefaultLogBuilder(ExtendedLogger logger,
Level level) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isEnabled(CharSequence message) |
protected boolean |
isEnabled(Message message) |
protected boolean |
isEnabled(Object message) |
protected boolean |
isEnabled(String message) |
protected boolean |
isEnabled(String message,
Object... params) |
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) |
boolean |
isInUse() |
void |
log()
Causes all the data collected to be logged.
|
void |
log(CharSequence message)
Causes all the data collected to be logged along with the message.
|
void |
log(Message message)
Causes all the data collected to be logged along with the message.
|
void |
log(Object message)
Causes all the data collected to be logged along with the message.
|
void |
log(String message)
Causes all the data collected to be logged along with the message.
|
void |
log(String message,
Object... params)
Logs a message with parameters.
|
void |
log(String message,
Object p0)
Logs a message with parameters.
|
void |
log(String message,
Object p0,
Object p1)
Logs a message with parameters.
|
void |
log(String message,
Object p0,
Object p1,
Object p2)
Logs a message with parameters.
|
void |
log(String message,
Object p0,
Object p1,
Object p2,
Object p3)
Logs a message with parameters.
|
void |
log(String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4)
Logs a message with parameters.
|
void |
log(String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5)
Logs a message with parameters.
|
void |
log(String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5,
Object p6)
Logs a message with parameters.
|
void |
log(String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5,
Object p6,
Object p7)
Logs a message with parameters.
|
void |
log(String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5,
Object p6,
Object p7,
Object p8)
Logs a message with parameters.
|
void |
log(String message,
Object p0,
Object p1,
Object p2,
Object p3,
Object p4,
Object p5,
Object p6,
Object p7,
Object p8,
Object p9)
Logs a message with parameters.
|
void |
log(String message,
Supplier<?>... params)
Causes all the data collected to be logged along with the message and parameters.
|
void |
log(Supplier<Message> messageSupplier)
Causes all the data collected to be logged along with the message.
|
Message |
logAndGet(Supplier<Message> messageSupplier)
Causes all the data collected to be logged along with the message.
|
LogBuilder |
reset(ExtendedLogger logger,
Level level)
This method should be considered internal.
|
void |
setEntryPoint(String fqcn)
Fully qualified class name of the entry point to the logging system.
|
LogBuilder |
withLocation()
An implementation will calculate the caller's stack frame and include it in the log event.
|
LogBuilder |
withLocation(StackTraceElement location)
Adds the specified stack trace element to the log event.
|
LogBuilder |
withMarker(Marker marker)
Includes a Marker in the log event.
|
LogBuilder |
withThrowable(Throwable throwable)
Includes a Throwable in the log event.
|
public DefaultLogBuilder(ExtendedLogger logger, Level level)
public DefaultLogBuilder()
public void setEntryPoint(String fqcn)
BridgeAwaresetEntryPoint in interface BridgeAwarepublic LogBuilder reset(ExtendedLogger logger, Level level)
level - The logging level for this event.public LogBuilder withMarker(Marker marker)
LogBuilderwithMarker in interface LogBuildermarker - The Marker to log.public LogBuilder withThrowable(Throwable throwable)
LogBuilderwithThrowable in interface LogBuilderthrowable - The Throwable to log.public LogBuilder withLocation()
LogBuilderwithLocation in interface LogBuilderpublic LogBuilder withLocation(StackTraceElement location)
LogBuilderwithLocation in interface LogBuilderlocation - The stack trace element to include in the log event.public boolean isInUse()
public void log(Message message)
LogBuilderlog in interface LogBuildermessage - The message to log.public Message logAndGet(Supplier<Message> messageSupplier)
LogBuilderlogAndGet in interface LogBuildermessageSupplier - The supplier of the message to log.public void log(CharSequence message)
LogBuilderlog in interface LogBuildermessage - The message to log.public void log(String message)
LogBuilderlog in interface LogBuildermessage - The message to log.public void log(String message, Object... params)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.params - parameters to the message.Unboxpublic void log(String message, Supplier<?>... params)
LogBuilderlog in interface LogBuildermessage - The message.params - Parameters to the message.public void log(Supplier<Message> messageSupplier)
LogBuilderlog in interface LogBuildermessageSupplier - The supplier of the message to log.public void log(Object message)
LogBuilderlog in interface LogBuildermessage - The message to log.public void log(String message, Object p0)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.p0 - parameter to the message.Unboxpublic void log(String message, Object p0, Object p1)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.p0 - parameter to the message.p1 - parameter to the message.Unboxpublic void log(String message, Object p0, Object p1, Object p2)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.p0 - parameter to the message.p1 - parameter to the message.p2 - parameter to the message.Unboxpublic void log(String message, Object p0, Object p1, Object p2, Object p3)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.p0 - parameter to the message.p1 - parameter to the message.p2 - parameter to the message.p3 - parameter to the message.Unboxpublic void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.p0 - parameter to the message.p1 - parameter to the message.p2 - parameter to the message.p3 - parameter to the message.p4 - parameter to the message.Unboxpublic void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.p0 - parameter to the message.p1 - parameter to the message.p2 - parameter to the message.p3 - parameter to the message.p4 - parameter to the message.p5 - parameter to the message.Unboxpublic void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.p0 - parameter to the message.p1 - parameter to the message.p2 - parameter to the message.p3 - parameter to the message.p4 - parameter to the message.p5 - parameter to the message.p6 - parameter to the message.Unboxpublic void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.p0 - parameter to the message.p1 - parameter to the message.p2 - parameter to the message.p3 - parameter to the message.p4 - parameter to the message.p5 - parameter to the message.p6 - parameter to the message.p7 - parameter to the message.Unboxpublic void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.p0 - parameter to the message.p1 - parameter to the message.p2 - parameter to the message.p3 - parameter to the message.p4 - parameter to the message.p5 - parameter to the message.p6 - parameter to the message.p7 - parameter to the message.p8 - parameter to the message.Unboxpublic void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9)
LogBuilderlog in interface LogBuildermessage - the message to log; the format depends on the message factory.p0 - parameter to the message.p1 - parameter to the message.p2 - parameter to the message.p3 - parameter to the message.p4 - parameter to the message.p5 - parameter to the message.p6 - parameter to the message.p7 - parameter to the message.p8 - parameter to the message.p9 - parameter to the message.Unboxpublic void log()
LogBuilderlog in interface LogBuilderprotected boolean isEnabled(Message message)
protected boolean isEnabled(CharSequence message)
protected boolean isEnabled(String message)
protected boolean isEnabled(Object message)
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)
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.