UNPKG

@push.rocks/smartlog

Version:

A minimalistic, distributed, and extensible logging tool supporting centralized log management.

21 lines (20 loc) 673 B
import type { ILogDestination, ILogPackage, TLogLevel } from '../dist_ts_interfaces/index.js'; export interface IDestinationBufferOptions { maxEntries?: number; } export interface IBufferQueryOptions { level?: TLogLevel | TLogLevel[]; search?: string; limit?: number; offset?: number; since?: number; } export declare class SmartlogDestinationBuffer implements ILogDestination { private logPackages; private maxEntries; constructor(options?: IDestinationBufferOptions); handleLog(logPackage: ILogPackage): Promise<void>; getEntries(options?: IBufferQueryOptions): ILogPackage[]; getEntryCount(): number; clear(): void; }