From 629439090eb9a68df05109cfff3ab03b299e0bc6 Mon Sep 17 00:00:00 2001 From: Hellblazer Date: Mon, 27 May 2024 15:24:22 -0700 Subject: [PATCH] better logging --- .../com/salesforce/apollo/thoth/KerlDHT.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/thoth/src/main/java/com/salesforce/apollo/thoth/KerlDHT.java b/thoth/src/main/java/com/salesforce/apollo/thoth/KerlDHT.java index 291995bde..155d381b1 100644 --- a/thoth/src/main/java/com/salesforce/apollo/thoth/KerlDHT.java +++ b/thoth/src/main/java/com/salesforce/apollo/thoth/KerlDHT.java @@ -247,7 +247,7 @@ public List append(KERL_ kerl) { return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error appending KERL: {} on: {}", ce.getMessage(), member.getId()); + log.warn("error appending KERL: {} on: {}", ce.getMessage(), member.getId()); return Collections.emptyList(); } throw new IllegalStateException(e.getCause()); @@ -277,7 +277,7 @@ public KeyState_ append(KeyEvent_ event) { return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error appending Key Event: {} on: {}", ce.getMessage(), member.getId()); + log.warn("error appending Key Event: {} on: {}", ce.getMessage(), member.getId()); return KeyState_.getDefaultInstance(); } throw new IllegalStateException(e.getCause()); @@ -334,7 +334,7 @@ public Empty appendAttachments(List events) { return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error appending attachments: {} on: {}", ce.getMessage(), member.getId()); + log.warn("error appending attachments: {} on: {}", ce.getMessage(), member.getId()); return Empty.getDefaultInstance(); } throw new IllegalStateException(e.getCause()); @@ -367,7 +367,7 @@ public Empty appendValidations(Validations validations) { return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error appending validations: {} on: {}", ce.getMessage(), member.getId()); + log.warn("error appending validations: {} on: {}", ce.getMessage(), member.getId()); return Empty.getDefaultInstance(); } throw new IllegalStateException(e.getCause()); @@ -421,7 +421,7 @@ public Attachment getAttachment(EventCoords coordinates) { return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); + log.warn("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); return null; } throw new IllegalStateException(e.getCause()); @@ -456,7 +456,7 @@ public KERL_ getKERL(Ident identifier) { return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); + log.warn("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); return KERL_.getDefaultInstance(); } throw new IllegalStateException(e.getCause()); @@ -531,7 +531,7 @@ public KeyState_ getKeyState(EventCoords coordinates) { return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); + log.warn("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); return KeyState_.getDefaultInstance(); } throw new IllegalStateException(e.getCause()); @@ -541,7 +541,7 @@ public KeyState_ getKeyState(EventCoords coordinates) { @Override public KeyState_ getKeyState(Ident identifier, long sequenceNumber) { var operation = "getKeyState(%s, %s)".formatted(Identifier.from(identifier), ULong.valueOf(sequenceNumber)); - log.info("{} on: {}", operation, member.getId()); + log.warn("{} on: {}", operation, member.getId()); if (identifier == null) { return KeyState_.getDefaultInstance(); } @@ -568,7 +568,7 @@ public KeyState_ getKeyState(Ident identifier, long sequenceNumber) { return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); + log.warn("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); return KeyState_.getDefaultInstance(); } throw new IllegalStateException(e.getCause()); @@ -604,7 +604,7 @@ public KeyState_ getKeyState(Ident identifier) { return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); + log.warn("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); return KeyState_.getDefaultInstance(); } throw new IllegalStateException(e.getCause()); @@ -640,7 +640,7 @@ public KeyStateWithAttachments_ getKeyStateWithAttachments(EventCoords coordinat return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error {} on: {}", operation, member.getId(), ce); + log.warn("error {} on: {}", operation, member.getId(), ce); return null; } throw new IllegalStateException(e.getCause()); @@ -676,7 +676,7 @@ public KeyStateWithEndorsementsAndValidations_ getKeyStateWithEndorsementsAndVal return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); + log.warn("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); return null; } throw new IllegalStateException(e.getCause()); @@ -712,7 +712,7 @@ public Validations getValidations(EventCoords coordinates) { return null; } catch (ExecutionException e) { if (e.getCause() instanceof CompletionException ce) { - log.info("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); + log.warn("error {} : {} on: {}", operation, ce.getMessage(), member.getId()); return null; } throw new IllegalStateException(e.getCause()); @@ -1046,31 +1046,31 @@ private class Service implements ProtoKERLService { @Override public List append(KERL_ kerl_) { - log.info("appending kerl on: {}", member.getId()); + log.debug("appending kerl on: {}", member.getId()); return complete(k -> k.append(kerl_)); } @Override public List append(List events) { - log.info("appending events on: {}", member.getId()); + log.debug("appending events on: {}", member.getId()); return complete(k -> k.append(events)); } @Override public List append(List events, List attachments) { - log.info("appending events and attachments on: {}", member.getId()); + log.debug("appending events and attachments on: {}", member.getId()); return complete(k -> k.append(events, attachments)); } @Override public Empty appendAttachments(List attachments) { - log.info("append attachments on: {}", member.getId()); + log.debug("append attachments on: {}", member.getId()); return complete(k -> k.appendAttachments(attachments)); } @Override public Empty appendValidations(Validations validations) { - log.info("append validations on: {}", member.getId()); + log.debug("append validations on: {}", member.getId()); return complete(k -> k.appendValidations(validations)); }