@eggjs/logrotator
Version:
logrotator for egg
17 lines (16 loc) • 495 B
TypeScript
import type { EggCore } from '@eggjs/core';
export interface RotatorOptions {
app: EggCore;
}
export interface RotateFile {
srcPath: string;
targetPath: string;
}
export declare abstract class LogRotator {
protected readonly options: RotatorOptions;
protected readonly app: EggCore;
protected readonly logger: EggCore['coreLogger'];
constructor(options: RotatorOptions);
abstract getRotateFiles(): Promise<Map<string, RotateFile>>;
rotate(): Promise<void>;
}