tomlurge / converTor

BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

usage info should be omitted when correct parameters are given #9

Closed iwakeh closed 8 years ago

iwakeh commented 8 years ago

This is very minor, but I cannot set the level of the issue. The usage is always printed when running the jar.

 java -jar dist/converTor.jar -p -i in

Converter from Tor CollecTor data to JSON, Parquet or Avro.
Call with parameter '-h' for help and more options.

  Conversion with arguments: -p -i in 

  Current parameters:
  -f    --format     <arg>    default: json, optional: parquet, avro   json
  -s    --suffix                                                       
  -i    --inPath     <arg>    default: current working directory       in
  -o    --outPath    <arg>    default: current working directory       
  -l    --logsPath   <arg>    default: current working directory       
  -cs   --snappy                                                       false
  -cz   --zip                 Avro as BZip2, Parquet & JSON as GZip    false
  -p    --pretty              pretty printed JSON                      true
  -m    --maxFiles   <arg>    default: 20                              20
  -d    --debug               print JSON descriptors to console        false
  -g    --log                 log to file 'converTor.log'              false
tomlurge commented 8 years ago

The general idea is to make converTor easily usable also for people that are not used to working on the commandline. To that end a verbose confirmation message seemd useful. If this appears excessive and loud maybe it should only be shown in this detail when an unvalid parameter was entered.

iwakeh commented 8 years ago

The usage message is fine. What troubled me in the example above was that the usage info was printed even though I entered a valid command line and the convertor was running. As said before this is a minor tweak.

tomlurge commented 8 years ago

Removed message from standard oputput. It will still appear when logging is enabled.