diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2020-10-16 00:45:45 +0200 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2020-10-16 00:45:45 +0200 |
| commit | 857a3614f0aac2510717799708760a4124d412c9 (patch) | |
| tree | d7d12e8cefbbc761882c9fdb9273739cf100ef5d /mumctl | |
| parent | 91fbdd888ec5b8356f7278150eebd1a8b980a134 (diff) | |
| download | mum-857a3614f0aac2510717799708760a4124d412c9.tar.gz | |
update logging
Diffstat (limited to 'mumctl')
| -rw-r--r-- | mumctl/src/main.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/mumctl/src/main.rs b/mumctl/src/main.rs index c6339f7..e8ac47f 100644 --- a/mumctl/src/main.rs +++ b/mumctl/src/main.rs @@ -7,6 +7,7 @@ use std::fs; fn main() { setup_logger(); + debug!("Logger up!"); let matches = App::new("mumctl") .setting(AppSettings::ArgRequiredElseHelp) @@ -33,6 +34,7 @@ fn main() { .subcommand(SubCommand::with_name("status")) .get_matches(); + debug!("Matching clap"); let command = if let Some(matches) = matches.subcommand_matches("server") { if let Some(matches) = matches.subcommand_matches("connect") { @@ -64,17 +66,18 @@ fn main() { } else { None }; + debug!("Matched {:#?}", &command); - debug!("Creating channel"); + debug!("Creating CommandResponse-channel"); let (tx_client, rx_client): (IpcSender<Result<Option<CommandResponse>, ()>>, IpcReceiver<Result<Option<CommandResponse>, ()>>) = ipc::channel().unwrap(); let server_name = fs::read_to_string("/var/tmp/mumd-oneshot").unwrap(); //TODO don't panic - info!("Sending {:#?}", command); + info!("Sending {:#?}\n to {}", command, server_name); let tx0 = IpcSender::connect(server_name).unwrap(); tx0.send((command.unwrap(), tx_client)).unwrap(); - debug!("Reading response"); + debug!("Waiting for response"); let response = rx_client.recv().unwrap(); - debug!("\n{:#?}", response); + debug!("Received {:#?}", response); } |
