diff options
author | a.sreekumar <ajith.sreekumar@bell.ca> | 2021-07-28 17:21:35 +0100 |
---|---|---|
committer | Ajith Sreekumar <ajith.sreekumar@bell.ca> | 2021-08-03 09:09:16 +0000 |
commit | 05fd9b0614a532fe529ce22a8bb5fabd62a3d5aa (patch) | |
tree | 986ff015505e88b009d9e0f28fbb5d10e8b726de /services/services-engine/src/main/java/org | |
parent | 27989fda75e371eac840b55d847e7b27129df906 (diff) |
Improve APEX logging for irrelevant events
When multiple policies are expecting event on the same topic/endpoint,
a lot of event parsing failure log messages are generated
unnecessarily. With this change, only a 1 line message will
be printed if an event cannot be parsed, and the detailed messages
will be available at debug level.
Change-Id: If1e7460ef5ed86fd470396f1e2ed8cc3c8af70c4
Issue-ID: POLICY-3499
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
(cherry picked from commit 1036206455218a4722079b749e628ca96825418d)
Diffstat (limited to 'services/services-engine/src/main/java/org')
-rw-r--r-- | services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventUnmarshaller.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventUnmarshaller.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventUnmarshaller.java index d31940aa0..2e6805181 100644 --- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventUnmarshaller.java +++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexEventUnmarshaller.java @@ -264,6 +264,9 @@ public class ApexEventUnmarshaller implements ApexEventReceiver, Runnable { } catch (ApexException e) { if (!iterator.hasNext()) { final String errorMessage = "Error while converting event into an ApexEvent for " + name; + if (!LOGGER.isDebugEnabled()) { + LOGGER.warn("{}. Detailed logs are available at debug level.", errorMessage); + } throw new ApexEventException(errorMessage, e); } } |