UNPKG

@boost/log

Version:

Lightweight level based logging system.

17 lines 784 B
import { Contract } from '@boost/common'; import type { Blueprint, Schemas } from '@boost/common/optimal'; import type { LogItem, LogLevel, Transportable, TransportOptions } from './types'; export declare abstract class Transport<Options extends TransportOptions> extends Contract<Options> implements Transportable { readonly levels: LogLevel[]; constructor(options: Options); blueprint(schemas: Schemas): Blueprint<TransportOptions>; /** * Format the log item into a message string, and append a trailing newline if missing. */ format(item: LogItem): string; /** * Write the formatted message according to the transport. */ abstract write(message: string, item: LogItem): Promise<void> | void; } //# sourceMappingURL=Transport.d.ts.map