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
If you are using a Java version previous to 8, you can try this:
LOGGER.error("Error al recuperar proveedores de la base de datos: " +
e + Arrays.asList(e.getStackTrace()).stream().map(new Function(){
@Override
public Object apply(Object t) {
return t.toString();
}
}).collect(Collectors.joining("\n")));