Skip to main content

per_agent_path

Function per_agent_path 

Source
pub fn per_agent_path(base: &str, name: &str, pid: u32) -> PathBuf
Expand description

Insert a per-agent tag before the file extension: run.log -> run.<name>.<pid>.log. The name is sanitised (no path separators / dots, so it can’t escape the directory) and the worker PID disambiguates same-named agents across scenarios so their truncating logs don’t clobber each other. Public so a parent can locate a worker’s file (see ProcessClient::pid).