In the process of converting some old loggers from String.format
to the newer slf4j {} variant, I stumbled upon this case:
logger.error(String.format("%s ... %s ... %s", ...), e);
I would like to use only {} and remove the String format, however, the logger method signature which includes the throwable is:
error(String msg, Throwable t)
So I do have to keep the String.format
in this case ?!
Why is there no:
error(Throwable t, String format, Object... arguments)