private String getStackTrace(Throwable exception) {
        LOGGER.error(exception);
        if (isStackTraceEnabled()) {
            try (StringBuilderWriter writer = new StringBuilderWriter()) {
                return writer.getBuilder().toString();
            }
        } else {
            return null;
        }
    }
Gets the full stack trace for the given exception and returns it as a
string.
@param exception
manager/api/exceptions/src/main/java/io/apiman/manager/api/rest/exceptions/mappers/BeanValidationExceptionMapper.java