In Logger, I think I can't find any method for reporting with a formatted message and a throwable.
I found
error(String format, Object... arguments)
error(String msg, Throwable t)
try {
doSomething(arg1, arg2);
} catch (final SomeException se) {
logger.error("Failed to do something with {} and {}", arg1, arg2);
logger.error("Failed to do something", se);
}
Is there any way to do like this?
logger.error("Failed to do something with {} and {}", new Object[]{arg1, arg2}, se);