@@ -37,7 +37,7 @@ use std::{
37
37
time:: { Duration , Instant } ,
38
38
} ;
39
39
use tokio:: sync:: mpsc:: { self , UnboundedReceiver } ;
40
- use tracing:: { debug, error} ;
40
+ use tracing:: { debug, error, info , trace } ;
41
41
42
42
/// Main controller struct for the TUI. The app uses a React-like architecture
43
43
/// for the view, with a wrapping controller (this struct). The main loop goes
@@ -161,6 +161,7 @@ impl Tui {
161
161
162
162
// ===== Message Phase =====
163
163
while let Ok ( message) = self . messages_rx . try_recv ( ) {
164
+ trace ! ( ?message, "Handling message" ) ;
164
165
// If an error occurs, store it so we can show the user
165
166
if let Err ( error) = self . handle_message ( message) {
166
167
self . view . open_modal ( error, ModalPriority :: High ) ;
@@ -181,6 +182,7 @@ impl Tui {
181
182
182
183
/// GOODBYE
183
184
fn quit ( & mut self ) {
185
+ info ! ( "Initiating graceful shutdown" ) ;
184
186
self . should_run = false ;
185
187
}
186
188
@@ -305,6 +307,10 @@ impl Tui {
305
307
} ) ?;
306
308
watcher
307
309
. watch ( self . collection_file . path ( ) , RecursiveMode :: NonRecursive ) ?;
310
+ info ! (
311
+ path = ?self . collection_file. path( ) , ?watcher,
312
+ "Watching collection file for changes"
313
+ ) ;
308
314
Ok ( watcher)
309
315
}
310
316
0 commit comments