UNPKG

@nowarajs/logger

Version:

Type-safe logging library for Bun with advanced TypeScript body intersection, modular sink pattern, transform streams, and immutable API design.

12 lines (11 loc) 439 B
import type { LogLevels } from './log-levels'; export interface LoggerSink<TLogObject = unknown> { /** * Logs a message with the sink's implementation. * * @param level - The log level at which the message should be logged. * @param date - The date at which the message was logged. * @param object - The object to log. */ log(level: LogLevels, date: Date, object: TLogObject): Promise<void> | void; }