Improve logging in NatService (#4006)

Improve logging in NatService to clarify what's happening. Increase log severity as it can cause peers to fail to connect when running in k8s.

Signed-off-by: Antony Denyer <git@antonydenyer.co.uk>
pull/4005/head
Antony Denyer 2 years ago committed by GitHub
parent 755771d22c
commit bbb70903ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      nat/src/main/java/org/hyperledger/besu/nat/NatService.java

@ -95,10 +95,12 @@ public class NatService {
try { try {
getNatManager().orElseThrow().start(); getNatManager().orElseThrow().start();
} catch (Exception e) { } catch (Exception e) {
LOG.debug( LOG.warn(
"Nat manager failed to configure itself automatically due to the following reason : {}. {}", "Nat manager failed to configure itself automatically due to the following reason : {}. {}",
e.getMessage(), e.getMessage(),
(fallbackEnabled) ? "NONE mode will be used" : ""); (fallbackEnabled)
? "NONE mode will be used as a fallback (set --Xnat-method-fallback-enabled=false to disable)"
: "");
if (fallbackEnabled) { if (fallbackEnabled) {
disableNatManager(); disableNatManager();
} else { } else {

Loading…
Cancel
Save