From f14f28b977f5aef27bd84a4f768710b51d15c5b5 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Fri, 30 Oct 2020 09:13:08 -0600 Subject: [PATCH] Cleanup logging statements (#1500) A few logging statements had errors in the log statement. Either the parameter wasn't used or it was expecting a formatted logger for errors. Signed-off-by: Danno Ferrin --- .../org/hyperledger/besu/consensus/ibft/EventMultiplexer.java | 2 +- .../besu/ethereum/permissioning/TomlConfigFileParser.java | 2 +- nat/src/main/java/org/hyperledger/besu/nat/NatService.java | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/EventMultiplexer.java b/consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/EventMultiplexer.java index 3f57265a9a..8b3f735a65 100644 --- a/consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/EventMultiplexer.java +++ b/consensus/ibft/src/main/java/org/hyperledger/besu/consensus/ibft/EventMultiplexer.java @@ -57,7 +57,7 @@ public class EventMultiplexer { throw new RuntimeException("Illegal event in queue."); } } catch (final Exception e) { - LOG.error("State machine threw exception while processing event {" + ibftEvent + "}", e); + LOG.error("State machine threw exception while processing event \\{" + ibftEvent + "\\}", e); } } } diff --git a/ethereum/permissioning/src/main/java/org/hyperledger/besu/ethereum/permissioning/TomlConfigFileParser.java b/ethereum/permissioning/src/main/java/org/hyperledger/besu/ethereum/permissioning/TomlConfigFileParser.java index 2fbc4f594d..543f033a8d 100644 --- a/ethereum/permissioning/src/main/java/org/hyperledger/besu/ethereum/permissioning/TomlConfigFileParser.java +++ b/ethereum/permissioning/src/main/java/org/hyperledger/besu/ethereum/permissioning/TomlConfigFileParser.java @@ -68,7 +68,7 @@ public class TomlConfigFileParser { } if (!tomlConfigFile.canWrite()) { LOG.warn( - "Write access denied for file at: %s. Configuration modification operations will not be permitted.", + "Write access denied for file at: {}. Configuration modification operations will not be permitted.", filename); } return tomlConfigFile; diff --git a/nat/src/main/java/org/hyperledger/besu/nat/NatService.java b/nat/src/main/java/org/hyperledger/besu/nat/NatService.java index 944ffb6eae..8f4554a14b 100644 --- a/nat/src/main/java/org/hyperledger/besu/nat/NatService.java +++ b/nat/src/main/java/org/hyperledger/besu/nat/NatService.java @@ -192,7 +192,8 @@ public class NatService { final NatManager natManager = getNatManager().orElseThrow(); return Optional.of(natManager.getPortMapping(serviceType, networkProtocol)); } catch (Exception e) { - LOG.warn("Caught exception while trying to query port mapping (ignoring): {}", e); + LOG.warn( + "Caught exception while trying to query port mapping (ignoring): {}", e.toString()); } } return Optional.empty();