Comment by pmdfgy

Comment by pmdfgy 9 hours ago

0 replies

Looks really nice and will give it a try on our codebase as an alternative to Winston.

Funny thing : one of the colleagues was unhappy when we proposed to define the logger as an interface, allowing us to switch implementation in one line. "We will never change the logger" he said...

    export interface Logger {
        debug(message: LoggerMessage, ...meta: unknown[]): void;
        error(err: Error): void;
        info(message: LoggerMessage, ...meta: unknown[]): void;
        trace(message: LoggerMessage, ...meta: unknown[]): void;
        warn(message: LoggerMessage, ...meta: unknown[]): void;
    }
Great job ! Emojis can actually be useful while working locally, especially to detect errors quickly.