Logster does not accept statsd-host option
ericgoedtel opened this issue · comments
Logster does not understand --statsd-host
even when using --output=statsd
.
me@my-macbook ~/Source $ virtualenv foo
me@my-macbook ~/Source $ source foo/bin/activate
(foo) me@my-macbook ~/Source $ git clone https://github.com/etsy/logster && cd logster
(foo) me@my-macbook ~/Source/logster $ logster -d --statsd-host=foo:8125 --output=statsd SampleLogster /path/to/file.log
Usage: logster [options] parser logfile
logster: error: no such option: --statsd-host
(foo) me@my-macbook ~/Source/logster $ logster -d --output=statsd SampleLogster /path/to/file.log
Usage: logster [options] parser logfile
...
StatsdOutput options:
--statsd-host=STATSD_HOST
Hostname and port for statsd collector, e.g.
statsd.example.com:8125
Usage: logster [options] parser logfile
logster: error: You must supply --statsd-host when using 'statsd' as an output type.
This appears to have regressed sometime between the introduction of the statsd (68e26f3) and the recent commit.
This issue does not occur if I use 68e26f3.
Try moving --statsd-host
after the --output=statsd
option in the commandline
That seemed to work. The documentation was just a little unclear but in hindsight it makes sense: Why accept the option when you don't know if that output is being used?
Thanks
@ericgoedtel I agree that it's un-ideal. As I recall this is a side-effect of the output plugin changes, where plugins can carry their own options, but really it should be permissive of ordering