From 40750418049c5125724b004c8f55ae66ca77edcf Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Thu, 23 Apr 2026 00:48:22 +0300 Subject: feat(logging): add robust rotating support logs --- src/pane.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/pane.rs') diff --git a/src/pane.rs b/src/pane.rs index 8de53f59..ae44bde1 100644 --- a/src/pane.rs +++ b/src/pane.rs @@ -335,10 +335,7 @@ impl PaneRuntime { // --- Writer channel --- let (input_tx, mut input_rx) = mpsc::channel::(32); - info!( - pane = pane_id.raw(), - rows, cols, scrollback_limit_bytes, "spawning pane terminal" - ); + crate::logging::pane_spawn_started(pane_id.raw(), rows, cols, scrollback_limit_bytes); let terminal = crate::ghostty::Terminal::new(cols, rows, scrollback_limit_bytes) .map_err(|e| std::io::Error::other(e.to_string()))?; @@ -368,11 +365,16 @@ impl PaneRuntime { Ok(mut child) => { if let Some(pid) = child.process_id() { child_pid.store(pid, Ordering::Release); - info!(pane = pane_id.raw(), pid, "child spawned"); + crate::logging::pane_spawned(pane_id.raw(), pid); } match child.wait() { - Ok(status) => info!(pane = pane_id.raw(), ?status, "child exited"), - Err(e) => error!(pane = pane_id.raw(), err = %e, "child wait failed"), + Ok(status) => { + let status_text = format!("{status:?}"); + crate::logging::pane_exited(pane_id.raw(), &status_text); + } + Err(e) => { + crate::logging::pane_exit_failed(pane_id.raw(), &e.to_string()) + } } } Err(e) => error!(pane = pane_id.raw(), err = %e, "{spawn_error_message}"), -- cgit v1.2.3