Repository: aurora Updated Branches: refs/heads/master 710706f4e -> c4c55ff51
Print command line parameters when the scheduler starts Realized i never added this in the command line parser change. Note that this output differs from the original code in one important way - it uses `toString()` on the parameter type rather than printing the raw value from the command line. Unfortunately jcommander does not make that possible. `shiro_ini_path` is one example of an arg that would ideally print differently here. Reviewed at https://reviews.apache.org/r/65234/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/c4c55ff5 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/c4c55ff5 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/c4c55ff5 Branch: refs/heads/master Commit: c4c55ff518b254682a8610db2c9a53c5866e7bd6 Parents: 710706f Author: Bill Farner <wfar...@apache.org> Authored: Thu Jan 18 20:51:42 2018 -0800 Committer: Bill Farner <wfar...@apache.org> Committed: Thu Jan 18 20:51:42 2018 -0800 ---------------------------------------------------------------------- .../org/apache/aurora/scheduler/config/CommandLine.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/c4c55ff5/src/main/java/org/apache/aurora/scheduler/config/CommandLine.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/aurora/scheduler/config/CommandLine.java b/src/main/java/org/apache/aurora/scheduler/config/CommandLine.java index 2085810..1402905 100644 --- a/src/main/java/org/apache/aurora/scheduler/config/CommandLine.java +++ b/src/main/java/org/apache/aurora/scheduler/config/CommandLine.java @@ -127,6 +127,16 @@ public final class CommandLine { CliOptions options = new CliOptions(ImmutableList.copyOf(customOptions)); parser = prepareParser(options); parser.parse(args); + + LOG.info("-----------------------------------------------------------------------"); + LOG.info("Parameters:"); + parser.getParameters().stream() + .map(param -> + param.getLongestName() + ": " + param.getParameterized().get(param.getObject())) + .sorted() + .forEach(LOG::info); + LOG.info("-----------------------------------------------------------------------"); + instance = options; return options; } catch (ParameterException e) { @@ -136,8 +146,6 @@ public final class CommandLine { LOG.error(e.getMessage()); System.exit(1); throw new RuntimeException(e); - } catch (RuntimeException e) { - throw e; } }