In the process of converting some old logs with String.format to a new variant of slf4j {}, I came across this case:
logger.error(String.format("%s ... %s ... %s", ...), e);
I would like to use only {} and remove the String format, however, the signature of the registration method, which includes throwable:
error(String msg, Throwable t)
So, I need to save String.format in this case ?!
Why not:
error(Throwable t, String format, Object... arguments)
source share