From 497e825919415e618567d61b6aa0241033c0ebf4 Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Wed, 25 Sep 2019 09:07:21 -0600 Subject: [PATCH] Fix default logging (#47) Default logging should be 'null' - which means that Besu will do nothing to the Log4J2 logging levels and rely on the built in or user supplied log4j2.xml configuration files to set up logging. Signed-off-by: Danno Ferrin --- .../src/main/java/org/hyperledger/besu/cli/BesuCommand.java | 6 +++--- .../besu/cli/subcommands/RetestethSubCommand.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java index cf228fa925..00fcfcc9f9 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -538,8 +538,8 @@ public class BesuCommand implements DefaultCommandValues, Runnable { names = {"--logging", "-l"}, paramLabel = "", description = - "Logging verbosity levels: OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL (default: ${DEFAULT-VALUE})") - private final Level logLevel = Level.INFO; + "Logging verbosity levels: OFF, FATAL, ERROR, WARN, INFO, DEBUG, TRACE, ALL (default: INFO)") + private final Level logLevel = null; @Option( names = {"--miner-enabled"}, @@ -932,7 +932,7 @@ public class BesuCommand implements DefaultCommandValues, Runnable { if (!NetworkUtility.isNetworkInterfaceAvailable(p2pInterface)) { throw new ParameterException(commandLine, failMessage); } - } catch (UnknownHostException | SocketException e) { + } catch (final UnknownHostException | SocketException e) { throw new ParameterException(commandLine, failMessage, e); } } diff --git a/besu/src/main/java/org/hyperledger/besu/cli/subcommands/RetestethSubCommand.java b/besu/src/main/java/org/hyperledger/besu/cli/subcommands/RetestethSubCommand.java index 5e1b4809ab..d04b8d21cb 100644 --- a/besu/src/main/java/org/hyperledger/besu/cli/subcommands/RetestethSubCommand.java +++ b/besu/src/main/java/org/hyperledger/besu/cli/subcommands/RetestethSubCommand.java @@ -62,7 +62,7 @@ public class RetestethSubCommand implements Runnable { paramLabel = "", description = "Logging verbosity levels: OFF, FATAL, WARN, INFO, DEBUG, TRACE, ALL (default: INFO)") - private final Level logLevel = Level.INFO; + private final Level logLevel = null; @SuppressWarnings("FieldMayBeFinal") // Because PicoCLI requires Strings to not be final. @Option(