You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2021/07/05 07:31:14 UTC

[unomi] branch unomi-1.5.x updated: UNOMI-494 Change validation exception logging to debug (#316)

This is an automated email from the ASF dual-hosted git repository.

shuber pushed a commit to branch unomi-1.5.x
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/unomi-1.5.x by this push:
     new 309a624  UNOMI-494 Change validation exception logging to debug (#316)
309a624 is described below

commit 309a624a14c6fd8c83cd70dc2f6d37df3ccb36ff
Author: Serge Huber <sh...@jahia.com>
AuthorDate: Mon Jul 5 09:28:39 2021 +0200

    UNOMI-494 Change validation exception logging to debug (#316)
    
    (cherry picked from commit d67bdb7e56c7d86f2157a371b68bdd236780dd83)
---
 .../org/apache/unomi/rest/exception/ValidationExceptionMapper.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rest/src/main/java/org/apache/unomi/rest/exception/ValidationExceptionMapper.java b/rest/src/main/java/org/apache/unomi/rest/exception/ValidationExceptionMapper.java
index a403abf..98ec937 100644
--- a/rest/src/main/java/org/apache/unomi/rest/exception/ValidationExceptionMapper.java
+++ b/rest/src/main/java/org/apache/unomi/rest/exception/ValidationExceptionMapper.java
@@ -36,10 +36,10 @@ public class ValidationExceptionMapper implements ExceptionMapper<ConstraintViol
         exception.getConstraintViolations().forEach(constraintViolation -> {
             if (logger.isDebugEnabled()) {
                 logger.debug(String.format("value %s from %s %s", constraintViolation.getInvalidValue(),
-                        constraintViolation.getPropertyPath().toString(), constraintViolation.getMessage()));
+                        constraintViolation.getPropertyPath().toString(), constraintViolation.getMessage()), exception);
             }
             logger.error(constraintViolation.getPropertyPath().toString() + " " + constraintViolation.getMessage() + ". Enable debug log "
-                    + "level for more informations about the invalid value received", exception);
+                    + "level for more informations about the invalid value received");
         });
 
         return Response.status(Response.Status.BAD_REQUEST).header("Content-Type", MediaType.TEXT_PLAIN)