diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e64294..b66c7a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- added documentation to the sample config file +- improved help message ## [v0.2.1] - 2020-04-06 ### Fixed diff --git a/README.md b/README.md index 7dd8249..7ffa67b 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ USAGE: FLAGS: -h, --help Prints help information - -v, --verbose Be verbose (you can add this up to 4 times for more logs) + -v, --verbose Be verbose (you can add this up to 4 times for more logs). + By default, only errors are logged, so no output is a good thing. -V, --version Prints version information ARGS: diff --git a/config.toml.sample b/config.toml.sample index 4011880..25de410 100644 --- a/config.toml.sample +++ b/config.toml.sample @@ -1,5 +1,11 @@ +# Defines where the metrics will be served. +# Takes the format IPv4:port or [IPv6]:port listener = "[::]:9898" +# Array of hosts to ping. Currently only supports plain IPs, no DNS names. +# The format here is `"host" = interval in milliseconds`, so these examples +# will ping the primary and secondary IP of cloudflare's 1.1.1.1 DNS service +# every 500ms, or twice per second. [hosts] "1.1.1.1" = 500 "1.0.0.1" = 500 diff --git a/src/config.rs b/src/config.rs index db5398e..d4ec22d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -35,7 +35,8 @@ pub(crate) fn setup_clap() -> clap::ArgMatches<'static> { (author: crate_authors!()) (about: crate_description!()) (@arg config: +required "Set config file") - (@arg v: -v --verbose ... "Be verbose (you can add this up to 4 times for more logs)") + (@arg v: -v --verbose ... "Be verbose (you can add this up to 4 times for more logs). +By default, only errors are logged, so no output is a good thing.") ) .get_matches() }