zeed
    Preparing search index...

    Interface LoggerInterface

    interface LoggerInterface {
        active: boolean;
        assert: (condition: unknown, ...messages: any[]) => asserts condition;
        debug: (...messages: any[]) => void;
        error: (...messages: any[]) => void;
        extend: (prefix: string) => LoggerInterface;
        factory?: LoggerContextInterface;
        fatal: (...messages: any[]) => never;
        generic: (level: number, ...messages: any[]) => void;
        info: (...messages: any[]) => void;
        label: string;
        level: number;
        warn: (...messages: any[]) => void;
        (...messages: any[]): void;
    }
    Index

    Properties

    active: boolean

    use .level = LogLevel.off or LogLevel.all

    assert: (condition: unknown, ...messages: any[]) => asserts condition

    Throws if condition is not truthy.

    Attention! Due to a bug in typescript you will need to explicitly set the LoggerInterface type in order to have the assertions having an effect on unreachable code. Example:

    const log: LoggerInterface = Logger('xxx')
    

    Bug https://github.com/microsoft/TypeScript/issues/50363#issuecomment-1219811447

    debug: (...messages: any[]) => void
    error: (...messages: any[]) => void
    extend: (prefix: string) => LoggerInterface
    fatal: (...messages: any[]) => never

    Always throws.

    Attention! Due to a bug in typescript you will need to explicitly set the LoggerInterface type in order to have the assertions having an effect on unreachable code. Example:

    const log: LoggerInterface = Logger('xxx')
    

    Bug https://github.com/microsoft/TypeScript/issues/50363#issuecomment-1219811447

    generic: (level: number, ...messages: any[]) => void
    info: (...messages: any[]) => void
    label: string
    level: number
    warn: (...messages: any[]) => void