@nowarajs/logger
Version:
Type-safe logging library for Bun with advanced TypeScript body intersection, modular strategy pattern, transform streams, and immutable API design.
23 lines (22 loc) • 890 B
TypeScript
import type { LoggerStrategy } from '../types/loggerStrategy';
import type { LogLevels } from '../types/logLevels';
/**
* ConsoleLoggerStrategy implements LoggerStrategy to provide logging functionality to the console. ({@link LoggerStrategy})
*/
export declare class ConsoleLoggerStrategy implements LoggerStrategy {
private readonly _colorize;
/**
* Initializes the ConsoleLoggerStrategy.
*
* @param colorize - Indicates if the output should be colorized. (Default is false.)
*/
constructor(colorize?: boolean);
/**
* Logs a message to the console with the specified log level.
*
* @param level - The log level at which the message should be logged. ({@link LogLevels})
* @param date - The date at which the message was logged.
* @param object - The object to log.
*/
log(level: LogLevels, date: Date, object: unknown): void;
}