public class DefaultLogBuilder extends Object implements LogBuilder
NOOP
Constructor and Description |
---|
DefaultLogBuilder(Logger logger) |
DefaultLogBuilder(Logger logger,
Level level) |
Modifier and Type | Method and Description |
---|---|
boolean |
isInUse() |
void |
log(CharSequence message) |
void |
log(Message message) |
void |
log(Object message) |
void |
log(String 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) |
void |
log(Supplier<Message> messageSupplier) |
LogBuilder |
reset(Level level)
This method should be considered internal.
|
LogBuilder |
withLocation() |
LogBuilder |
withLocation(StackTraceElement location) |
LogBuilder |
withMarker(Marker marker) |
LogBuilder |
withThrowable(Throwable throwable) |
public DefaultLogBuilder(Logger logger)
public LogBuilder reset(Level level)
level
- The logging level for this event.public LogBuilder withMarker(Marker marker)
withMarker
in interface LogBuilder
public LogBuilder withThrowable(Throwable throwable)
withThrowable
in interface LogBuilder
public LogBuilder withLocation()
withLocation
in interface LogBuilder
public LogBuilder withLocation(StackTraceElement location)
withLocation
in interface LogBuilder
public boolean isInUse()
public void log(Message message)
log
in interface LogBuilder
public void log(CharSequence message)
log
in interface LogBuilder
public void log(String message)
log
in interface LogBuilder
public void log(String message, Object... params)
LogBuilder
log
in interface LogBuilder
message
- the message to log; the format depends on the message factory.params
- parameters to the message.Unbox
public void log(String message, Supplier<?>... params)
log
in interface LogBuilder
public void log(Supplier<Message> messageSupplier)
log
in interface LogBuilder
public void log(Object message)
log
in interface LogBuilder
public void log(String message, Object p0)
LogBuilder
log
in interface LogBuilder
message
- the message to log; the format depends on the message factory.p0
- parameter to the message.Unbox
public void log(String message, Object p0, Object p1)
LogBuilder
log
in interface LogBuilder
message
- the message to log; the format depends on the message factory.p0
- parameter to the message.p1
- parameter to the message.Unbox
public void log(String message, Object p0, Object p1, Object p2)
LogBuilder
log
in interface LogBuilder
message
- 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.Unbox
public void log(String message, Object p0, Object p1, Object p2, Object p3)
LogBuilder
log
in interface LogBuilder
message
- 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.Unbox
public void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4)
LogBuilder
log
in interface LogBuilder
message
- 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.Unbox
public void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5)
LogBuilder
log
in interface LogBuilder
message
- 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.Unbox
public void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6)
LogBuilder
log
in interface LogBuilder
message
- 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.Unbox
public void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7)
LogBuilder
log
in interface LogBuilder
message
- 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.Unbox
public void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8)
LogBuilder
log
in interface LogBuilder
message
- 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.Unbox
public void log(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9)
LogBuilder
log
in interface LogBuilder
message
- 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.Unbox
Copyright © 1999-2020 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.