From 663d30d92f199cf226200a262d1130588a939e0a Mon Sep 17 00:00:00 2001 From: garyschulte Date: Tue, 30 Jan 2024 20:03:32 -0800 Subject: [PATCH] review feedback: use lambda for trace log in peerDiscoveryAgent Signed-off-by: garyschulte --- .../ethereum/p2p/discovery/PeerDiscoveryAgent.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/PeerDiscoveryAgent.java b/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/PeerDiscoveryAgent.java index b4505797a70..b93846bfbe1 100644 --- a/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/PeerDiscoveryAgent.java +++ b/ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/discovery/PeerDiscoveryAgent.java @@ -338,10 +338,12 @@ static String deriveHost(final Endpoint sourceEndpoint, final Packet packet) { .findFirst() .orElseGet( () -> { - LOG.trace( - "Ignoring \"From\" endpoint {} in ping packet. Using UDP source host {}", - pingPacketHost.orElse("not specified"), - sourceEndpoint.getHost()); + LOG.atTrace() + .setMessage( + "Ignoring \"From\" endpoint {} in ping packet. Using UDP source host {}") + .addArgument(pingPacketHost.orElse("not specified")) + .addArgument(sourceEndpoint.getHost()) + .log(); return sourceEndpoint.getHost(); }); }