refresh_log_pointer

Function refresh_log_pointer 

Source
fn refresh_log_pointer(last_date: &mut String)
Expand description

Update the host log pointer file when the UTC date changes (midnight rollover). tracing_appender::rolling::daily creates a new file at UTC midnight, so the pointer must track the new date suffix.

Two pointers are written, matching main::init_logging:

  1. Local: <log_dir>/<pointer_name> with just the basename.
  2. Global: <root>/logs/<pointer_name> with the absolute path so legacy tooling (muxlog host) can resolve from outside the instance dir. Works for portable, installed, and dev modes — log_dir comes from AGENTMUX_LOG_DIR, set by data_paths.rs.