import { ICommonTargetOptions, ILogEntry, LogTarget } from "@spinajs/log-common"; /** * Options for {@link MemoryTarget}. */ export interface IMemoryTargetOptions extends ICommonTargetOptions { /** * Max number of log entries retained in the ring buffer. Once exceeded, the * oldest entries are dropped. Default is 100. */ limit: number; } /** * Ring-buffer target that keeps the last N log entries in memory. Lets a debug * / health endpoint or a crash handler read recent log context back in-process * ( eg. capturing all levels incl. trace ) without parsing the log file. * * Pure and browser-safe - no filesystem, no timers, no external deps. */ export declare class MemoryTarget extends LogTarget { protected Buffer: ILogEntry[]; constructor(options: IMemoryTargetOptions); write(data: ILogEntry): void; /** * Returns a shallow copy of the retained entries ( oldest first ) so callers * cannot mutate the ring buffer. */ getRecords(): ILogEntry[]; /** * Empties the buffer. */ clear(): void; } //# sourceMappingURL=MemoryTarget.d.ts.map