pub fn retain(
logs_dir: &Path,
now_ms: i64,
probe: &dyn ProcessProbe,
pair_is_dead: &dyn Fn(&str) -> bool,
) -> Vec<PathBuf>Expand description
Log retention (spec Logging). A base log and its .1 form one group of their kind (serve-*
and pair-* are counted separately); a group is deleted only when it is beyond the newest 20
of its kind AND its newest file is older than 14 days AND its owner is gone: for serve-<pid>
the pid is dead, for pair-<id> pair_is_dead(id). Decisions key on the FILE NAME’s id.
Returns the files removed.