diff --git a/Cargo.toml b/Cargo.toml index 0f5c65a..25322d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ smol = "1.2" signal-hook = "0.1" -slog = "2.5" +slog = { version = "2.5", features = ["max_level_trace"] } libc = "0.2" rsasl = "0.2.3" diff --git a/src/app.rs b/src/app.rs index c191679..3b80b83 100644 --- a/src/app.rs +++ b/src/app.rs @@ -69,6 +69,7 @@ impl<'a, S: Unpin> Sute<'a, S> { } fn handle_resize(&mut self, new_size: (u16,u16)) { + trace!(self.log, "Locking in handle_resize"); self.state.lock_mut().size = new_size; } @@ -82,6 +83,7 @@ impl<'a, S: Unpin> Sute<'a, S> { } pub fn handle_key(&mut self, key: Key) { + trace!(self.log, "Locking in handle_key"); let mut state = self.state.lock_mut(); match key { Key::Char('\n') => { @@ -96,7 +98,8 @@ impl<'a, S: Unpin> Sute<'a, S> { Key::Backspace => { state.cmd_line.pop(); }, - _ => {} + _ => { + } } } } @@ -118,6 +121,7 @@ impl <'a, S: Unpin + Signal> Future for Sute<'a, S> { }, // If the input closes stop the program None => { + trace!(self.log, "Locking in impl Future for Sute"); self.state.lock_mut().running = false; return Poll::Ready(()); }, diff --git a/src/main.rs b/src/main.rs index 70e58e9..9a077a7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -116,6 +116,13 @@ fn main() -> Result<(), io::Error> { Ok(()) }; + crit!(log, "Critical log line"); + error!(log, "Error log line"); + warn!(log, "Warning log line"); + info!(log, "Informational log line"); + debug!(log, "Debugging log line"); + trace!(log, "Tracing log line"); + lex.spawn(rpc_future).detach(); let t: Task> = lex.spawn(ui_future); t.detach();