Skip to content

Commit

Permalink
Correct librato args regression (#43)
Browse files Browse the repository at this point in the history
This commit fixes a regression wherein the host and token for
librato were confused. This only impacts hosts shipping metrics
to librato.

Signed-off-by: Brian L. Troutwine <blt@postmates.com>
  • Loading branch information
blt authored Jul 14, 2016
1 parent 977c93c commit f1dcd4f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cernan"
version = "0.2.1"
version = "0.2.2"
authors = ["Brian L. Troutwine <blt@postmates.com>"]
build = "build.rs"

Expand Down
10 changes: 6 additions & 4 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::str::FromStr;

const VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION");

#[derive(Clone)]
#[derive(Clone, Debug)]
pub struct Args {
pub statsd_port: u16,
pub graphite_port: u16,
Expand Down Expand Up @@ -112,9 +112,11 @@ pub fn parse_args() -> Args {
};

let (luser, lhost, ltoken) = if mk_librato {
(Some(args.value_of("librato-username").unwrap().to_string()),
Some(args.value_of("librato-token").unwrap().to_string()),
Some(args.value_of("librato-host").unwrap().to_string()))
(
Some(args.value_of("librato-username").unwrap().to_string()),
Some(args.value_of("librato-host").unwrap().to_string()),
Some(args.value_of("librato-token").unwrap().to_string()),
)
} else {
(None, None, None)
};
Expand Down
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ fn main() {
// No sense of why.
let _ = fern::init_global_logger(logger_config, log::LogLevelFilter::Trace);

debug!("ARGS: {:?}", args);
info!("cernan - {}", args.version);

trace!("trace messages enabled");
Expand Down

0 comments on commit f1dcd4f

Please sign in to comment.