public final class Slf4jMessageFormatter extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Slf4jMessageFormatter.ErrorHandler |
Modifier and Type | Method and Description |
---|---|
static void |
exHandle(Object obj,
Appendable sbuf,
Throwable t) |
static int |
format(Appendable to,
ObjectAppenderSupplier appSupplier,
String messagePattern,
Object... argArray)
Slf4j message formatter.
|
static int |
format(Appendable to,
String messagePattern,
Object... argArray)
Slf4j message formatter.
|
static int |
format(Appendable to,
String messagePattern,
ObjectAppenderSupplier appSupplier,
Object... argArray)
slf4j message formatter.
|
static int |
format(int firstArgIdx,
Appendable to,
String messagePattern,
ObjectAppenderSupplier appSupplier,
Object... argArray)
Slf4j message formatter.
|
static int |
format(Slf4jMessageFormatter.ErrorHandler exHandler,
int firstArgIdx,
Appendable to,
String messagePattern,
ObjectAppenderSupplier appSupplier,
Object... argArray)
Slf4j message formatter.
|
static void |
safeObjectAppend(Slf4jMessageFormatter.ErrorHandler exHandler,
Appendable sbuf,
Object obj,
ObjectAppenderSupplier appSupplier) |
static String |
toString(String messagePattern,
Object... argArray) |
public static void exHandle(Object obj, Appendable sbuf, Throwable t) throws IOException
IOException
public static int format(@Nonnull Appendable to, @Nonnull String messagePattern, Object... argArray) throws IOException
to
- Appendable to put formatted message to.messagePattern
- see org.slf4j.helpers.MessageFormatter for format.argArray
- the message arguments.IOException
public static int format(@Nonnull Appendable to, @Nonnull ObjectAppenderSupplier appSupplier, @Nonnull String messagePattern, Object... argArray) throws IOException
to
- Appendable to put formatted message to.appSupplier
- a supplier that will provide the serialization method for a particular argument type.messagePattern
- see org.slf4j.helpers.MessageFormatter for format.argArray
- the message arguments.IOException
public static int format(@Nonnull Appendable to, @Nonnull String messagePattern, @Nonnull ObjectAppenderSupplier appSupplier, Object... argArray) throws IOException
to
- Appendable to put formatted message to.messagePattern
- see org.slf4j.helpers.MessageFormatter for format.appSupplier
- a supplier that will provide the serialization method for a particular argument type.argArray
- the message arguments.IOException
- something wend wrong while writing to the appendable.public static int format(int firstArgIdx, @Nonnull Appendable to, @Nonnull String messagePattern, @Nonnull ObjectAppenderSupplier appSupplier, Object... argArray) throws IOException
to
- Appendable to put formatted message to.messagePattern
- see org.slf4j.helpers.MessageFormatter for format.appSupplier
- a supplier that will provide the serialization method for a particular argument type.firstArgIdx
- the index of the first parameter.argArray
- the message arguments.IOException
- something wend wrong while writing to the appendable.public static int format(Slf4jMessageFormatter.ErrorHandler exHandler, int firstArgIdx, @Nonnull Appendable to, @Nonnull String messagePattern, @Nonnull ObjectAppenderSupplier appSupplier, Object... argArray) throws IOException
safe
- - if true recoverable exHandle will be caught when writing arguments, and a error will be appended
instead.to
- Appendable to put formatted message to.messagePattern
- see org.slf4j.helpers.MessageFormatter for format.appSupplier
- a supplier that will provide the serialization method for a particular argument type.firstArgIdx
- the index of the first parameter.argArray
- the message arguments.IOException
- something wend wrong while writing to the appendable.public static void safeObjectAppend(Slf4jMessageFormatter.ErrorHandler exHandler, Appendable sbuf, Object obj, ObjectAppenderSupplier appSupplier) throws IOException
IOException
Copyright © 2018 SPF4J. All rights reserved.