From c9ff89b5f3660a9b9ec094141327f006d1633438 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 12 Oct 2021 18:54:01 -0700 Subject: fatcatd: display version correctly, and at startup --- rust/src/bin/fatcatd.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'rust/src') diff --git a/rust/src/bin/fatcatd.rs b/rust/src/bin/fatcatd.rs index b27ff911..006154df 100644 --- a/rust/src/bin/fatcatd.rs +++ b/rust/src/bin/fatcatd.rs @@ -35,7 +35,11 @@ impl AfterMiddleware for XClacksOverheadMiddleware { /// Create custom server, wire it to the autogenerated router, /// and pass it to the web server. fn main() -> Result<()> { - let _matches = App::new("server").get_matches(); + let _matches = App::new("fatcatd") + .version(env!("CARGO_PKG_VERSION")) + .author("Bryan Newbold ") + .about("Fatcat API Server") + .get_matches(); dotenv::dotenv().ok(); @@ -137,7 +141,9 @@ fn main() -> Result<()> { let host_port = "localhost:9411"; info!( logger, - "Starting fatcatd API server on http://{}", &host_port + "Starting fatcatd API server version {} on http://{}", + env!("CARGO_PKG_VERSION"), + &host_port, ); let mut chain = Chain::new(LoggerMiddleware::new(router, logger, formatter)); -- cgit v1.2.3