From aee57ea787a2729cb9eeb9b9cc3053b2184f3a00 Mon Sep 17 00:00:00 2001 From: Tomas Langer Date: Fri, 29 Jul 2022 14:04:20 +0200 Subject: [PATCH] Change log lever to fine for exception caught while intercepting (#4632) Signed-off-by: Tomas Langer --- .../servicecommon/restcdi/InterceptionRunnerImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/service-common/rest-cdi/src/main/java/io/helidon/servicecommon/restcdi/InterceptionRunnerImpl.java b/service-common/rest-cdi/src/main/java/io/helidon/servicecommon/restcdi/InterceptionRunnerImpl.java index 62ec9642da3..9ebda1be9df 100644 --- a/service-common/rest-cdi/src/main/java/io/helidon/servicecommon/restcdi/InterceptionRunnerImpl.java +++ b/service-common/rest-cdi/src/main/java/io/helidon/servicecommon/restcdi/InterceptionRunnerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Oracle and/or its affiliates. + * Copyright (c) 2021, 2022 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -110,7 +110,10 @@ public Object run( RuntimeException::new); } if (escapingException != null) { - LOGGER.log(Level.WARNING, ERROR_DURING_INTERCEPTION, escapingException); + // this exception is to be handled by JAX-RS after reported here, it should not be logged automatically + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, ERROR_DURING_INTERCEPTION, escapingException); + } throw escapingException; } return result;