Skip to main content

sweep

Function sweep 

Source
pub fn sweep(
    log_dir: &Path,
    journal: &Journal,
    retention: LogRetention,
    now: SystemTime,
) -> Result<Swept>
Expand description

Deletes from log_dir what retention doesn’t keep at now, sparing the logs of attempts in journal. A file that can’t be deleted is logged and counted as kept.

§Errors

An I/O error if the directory can’t be read (a missing one has nothing to sweep).