I was catching an exception and trying to write the stack trace to the logs like this:
log.warn(e.getMessage());
But all it said was
You can use
logger.log(Level.WARN, "logged exception", ex);
or
logger.warn("logged exception", ex);
Resources :