Skip to main content

resolve_log_dir

Function resolve_log_dir 

Source
pub fn resolve_log_dir(persistent_db_path: Option<&str>) -> PathBuf
Expand description

Compute the log directory for both hyperd output and the client-side tracing log. Shared by Engine::new and main so both land in the same place.

  • When a persistent path is supplied: same directory as that file (with ~ expansion applied). A project DB like ~/projects/foo.hyper gets logs in ~/projects/.
  • When no persistent path is supplied (ephemeral-only sessions): $TMPDIR/hyperdb-mcp-<pid>/. Multiple engines in the same PID share this log dir, which is fine — tracing is process-wide and the .hyper files themselves live in distinct per-engine subdirs.