import { Log } from "@spinajs/log-common"; import { ILogArchiveContext } from "./context.js"; /** * Retention policy for archived log files. Decides WHICH archives are deleted * after a rotation ( eg. keep newest N, drop older than maxAge ). * * Retention strategies are composable - a file target applies a LIST of them in * sequence, so count + age can be combined. Each concrete strategy is * `@NewInstance()` to keep per-target state isolated, mirroring the fs cleanup * strategies. */ export declare abstract class LogRetentionStrategy { protected Logger: Log; /** * Removes archives from `ctx.archiveDir` according to the strategy policy. * * @param ctx archive context of the file target */ abstract prune(ctx: ILogArchiveContext): Promise; /** * Single prune guarded against errors so one failing retention strategy never * aborts the rest of the retention list or the rotation routine. */ safePrune(ctx: ILogArchiveContext): Promise; } //# sourceMappingURL=retention-strategy.d.ts.map