UNPKG

@eggjs/logrotator

Version:
17 lines (16 loc) 495 B
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>; }