Feedback re Canton Help Command

Hi Canton Team,

Lurking through the Canton FS on Community 0.26.0, and I ran the `bin/canton --help’ command, and noticed an alignment issue.

Although this Canton is running on a Raspberry Pi using a Debian Lite, the Terminal, and my Screen Display are set to 1920x1080 on a 32" Sony TV, so there is no Terminal weirdness from a lack of desktop space.

Current bin/canton --help
Canton v0.26.0
Usage: canton [daemon|run] [options] <args>...

  -h, --help               Print usage
  --version                Print versions
  -c, --config <file1>,<file2>,...
                           Set configuration file(s).
                                                      If several configuration files assign values to the same key,
                                                      the last value is taken.
  -C, --config key-value's <key1>=<value1>,<key2>=<value2>
                           Set configuration key value pairs directly.
                                                      Can be useful for providing simple short config info.
  --bootstrap <file>       Set a script to run on startup
  --no-tty                 Do not use a tty
  --manual-start           Don't automatically start the nodes
  --sandbox                Use sandbox config and bootstrap
  -D<property>=<value>     Set a JVM property value

Logging Options:
  -v, --verbose            Set the canton logger level to DEBUG
  --debug                  Set the console level to INFO and the root logger to DEBUG
  --log-truncate           If set, the log file will be truncated on startup.
  --log-level-root <LEVEL>
                           Log-level of the root logger
  --log-level-canton <LEVEL>
                           Log-level of the com.digitalasset.canton logger
  --log-level-stdout <LEVEL>
                           Log-level of used as filter for stdout
  --log-file-appender rolling|flat(default)|off>
                           Log-level of used as filter for stdout
  --log-file-name <value>  Name and location of log-file, default is log/canton.log
  --log-file-rolling-history <value>
                           How many history files to keep when using the rolling log file appender.
  --log-file-rolling-pattern <value>
                           Which pattern to use to suffix the rolled log files. Default is 'yyyy-MM-dd'.
  --log-encoder <value>    Which encoder to use: plain|json
  --log-profile <value>    Use one of the default logging profiles: (container)

Use the JAVA_OPTS environment variable to set JVM parameters.

Command: daemon
Start all nodes automatically and run them without having a console (REPL).
Nodes can be controlled through the admin API.

Command: run <file>
Run a console script.
Stop all nodes when the script has terminated.
  <file>                   the script to run

Proposal

Align the left edge of the right hand elements to be much further across, this might induce a Line Wrap, but look cleaner and save at least 8 horizontal rows.

Proposed bin/canton --help
Canton v0.26.0
Usage: canton [daemon|run] [options] <args>...

  -h, --help                  Print usage
  --version                   Print versions
  -c, --config <file1>,<file2>,...
                              Set configuration file(s).
                              If several configuration files assign values to the same key,
                              the last value is taken.
  -C, --config key-value's <key1>=<value1>,<key2>=<value2>
                              Set configuration key value pairs directly.
                              Can be useful for providing simple short config info.
  --bootstrap <file>          Set a script to run on startup
  --no-tty                    Do not use a tty
  --manual-start              Don't automatically start the nodes
  --sandbox                   Use sandbox config and bootstrap
  -D<property>=<value>        Set a JVM property value

Logging Options:
  -v, --verbose               Set the canton logger level to DEBUG
  --debug                     Set the console level to INFO and the root logger to DEBUG
  --log-truncate              If set, the log file will be truncated on startup.
  --log-level-root <LEVEL>    Log-level of the root logger
  --log-level-canton <LEVEL>  Log-level of the com.digitalasset.canton logger
  --log-level-stdout <LEVEL>  Log-level of used as filter for stdout
...
Truncated
...
  --log-encoder <value>       Which encoder to use: plain|json
  --log-profile <value>       Use one of the default logging profiles: (container)

Use the JAVA_OPTS environment variable to set JVM parameters.

Command: daemon
Start all nodes automatically and run them without having a console (REPL).
Nodes can be controlled through the admin API.

Command: run <file>
Run a console script.
Stop all nodes when the script has terminated.
  <file>                   the script to run

In most cases, the explanation text could be made more concise:

  • Set the canton logger level to DEBUG > Set Logger level: DEBUG
  • Log-level of the root logger > Root Log-level

EDIT: changed Heading from Solution to Proposal.
I propose, you solve :grinning:

3 Likes

Hmm … thanks for the suggestion. We’re using GitHub - scopt/scopt: command line options parsing for Scala to manage the command line options and have therefore little influence on how things are rendered (without fixing the upstream libraries). However, let’s see if we can improve the situation by cleaning up the explanation texts.

2 Likes