@Override
protected void constructCommandLineOptions()
{
super.constructCommandLineOptions();
Option printVerbosityOption = OptionBuilder.withLongOpt(PRINT_VERBOSITY_OPT_NAME)
.hasArg()
.withArgName("print_verbosity")
.withDescription("print verbosity: " +
Arrays.toString(PrintVerbosity.values()) +
"; default: " + DEFAULT_PRINT_VERBOSITY)
.create(PRINT_VERBOSITY_OPT_CHAR);
Option outputFormatOption = OptionBuilder.withLongOpt(OUTPUT_FORMAT_OPT_NAME)
.hasArg()
.withArgName("output_format")
.withDescription("output format: " +
Arrays.toString(OutputFormat.values()) +
"; default: " + DEFAUL_OUTPUT_FORMAT)
.create(OUTPUT_FORMAT_OPT_CHAR);
Option outputOption = OptionBuilder.withLongOpt(OUTPUT_OPT_NAME)
.hasArg()
.withArgName("output_file")
.withDescription("output file or - for STDOUT")
.create(OUTPUT_OPT_CHAR);
Option resumeOption = OptionBuilder.withLongOpt(RESUME_OPT_NAME)
.hasArg()
.withArgName("checkpoint_dir")
.withDescription("resumes from a previous checkpoint")
.create();
Option verboseOption = OptionBuilder.withLongOpt(VERBOSE_OPT_NAME)
.withDescription("verbose logging: INFO or above")
.create(VERBOSE_OPT_CHAR);
Option eventNumOption = OptionBuilder.withLongOpt(EVENT_NUM_OPT_NAME)
.hasArg()
.withArgName("num")
.withDescription("max number of events to return; default: no limit")
.create(EVENT_NUM_OPT_CHAR);
Option durationOption = OptionBuilder.withLongOpt(DURATION_OPTION_NAME)
.hasArg()
.withArgName("duration_value")
.withDescription("max consumption duration: value[ns|us|ms|s|min|hr|d]; default: no limit")
.create(DURATION_OPTION_CHAR);
Option statsOption = OptionBuilder.withLongOpt(STATS_OPT_NAME)
.withDescription("print statistics at the end; Default: off")
.create();
Option sinceScnOption = OptionBuilder.withLongOpt(SCN_OPT_NAME)
.hasArg()
.withArgName("scn")
.withDescription("starts consumption from the given scn; special values: BOB for current beginning of relay buffer, " +
"EOB for current end of buffer; Default: BOB")
.create();