mirror of https://github.com/qos-ch/slf4j
manually revert pull-request #15
This commit is contained in:
parent
8110cbf1c7
commit
fa9e7aa37c
|
|
@ -180,27 +180,6 @@ final public class MessageFormatter {
|
|||
final Object[] argArray) {
|
||||
|
||||
Throwable throwableCandidate = getThrowableCandidate(argArray);
|
||||
return arrayFormat(messagePattern, argArray, throwableCandidate);
|
||||
}
|
||||
|
||||
/**
|
||||
* Same principle as the {@link #format(String, Object)} and
|
||||
* {@link #format(String, Object, Object)} methods except that any number of
|
||||
* arguments can be passed in an array.
|
||||
*
|
||||
* @param messagePattern
|
||||
* The message pattern which will be parsed and formatted
|
||||
* @param argArray
|
||||
* An array of arguments to be substituted in place of formatting
|
||||
* anchors
|
||||
* @param t
|
||||
* {@link Throwable} or {@code null} if not present
|
||||
* @return The formatted message
|
||||
*/
|
||||
final public static FormattingTuple arrayFormat(final String messagePattern,
|
||||
final Object[] argArray, final Throwable t) {
|
||||
|
||||
Throwable throwableCandidate = t;
|
||||
|
||||
if (messagePattern == null) {
|
||||
return new FormattingTuple(null, argArray, throwableCandidate);
|
||||
|
|
|
|||
|
|
@ -648,8 +648,7 @@ public final class JDK14LoggerAdapter extends MarkerIgnoringBase implements
|
|||
// do not perform this check. See also
|
||||
// http://bugzilla.slf4j.org/show_bug.cgi?id=90
|
||||
if (logger.isLoggable(julLevel)) {
|
||||
final FormattingTuple ft = MessageFormatter.arrayFormat(message, argArray, t);
|
||||
log(callerFQCN, julLevel, ft.getMessage(), ft.getThrowable());
|
||||
log(callerFQCN, julLevel, message, t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -598,8 +598,7 @@ public final class Log4jLoggerAdapter extends MarkerIgnoringBase implements
|
|||
throw new IllegalStateException("Level number " + level
|
||||
+ " is not recognized.");
|
||||
}
|
||||
final FormattingTuple ft = MessageFormatter.arrayFormat(msg, argArray, t);
|
||||
logger.log(callerFQCN, log4jLevel, ft.getMessage(), ft.getThrowable());
|
||||
logger.log(callerFQCN, log4jLevel, msg, t);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue