#[macro_use] extern crate clap; mod cfg_reader; const APP_VERSION: &'static str = env!("CARGO_PKG_VERSION"); const DEFAULT_CONFIG_FILE_NAME: &str = "/etc/s0_logger.cfg"; fn main() { let cli_args = clap_app!(s0_meter => (version: APP_VERSION) (author: "Harald Kube println!("No logging"), 1 => println!("A little logging"), 2 => println!("A little more logging"), _ => println!("A lot logging"), }; let config_file_name = cli_args .value_of("config") .unwrap_or(DEFAULT_CONFIG_FILE_NAME); println!("Read the config from file '{}'", config_file_name); }