Interface ILoggerProps

interface ILoggerProps {
    hideConsole?: boolean;
    level?:
        | "error"
        | "debug"
        | "info"
        | "warn";
    levelColor?: {
        debug: ((v: string) => string);
        error: ((v: string) => string);
        info: ((v: string) => string);
        warn: ((v: string) => string);
    };
    logTime?: boolean | (() => string);
    format?(level:
        | "error"
        | "debug"
        | "info"
        | "warn", time: string, color: ((v: string) => string), args: any[]): string;
    onLog?(info: ILogInfo): void;
}

Properties

hideConsole?: boolean
level?:
    | "error"
    | "debug"
    | "info"
    | "warn"
levelColor?: {
    debug: ((v: string) => string);
    error: ((v: string) => string);
    info: ((v: string) => string);
    warn: ((v: string) => string);
}
logTime?: boolean | (() => string)

Methods

  • Parameters

    • level:
          | "error"
          | "debug"
          | "info"
          | "warn"
    • time: string
    • color: ((v: string) => string)
        • (v): string
        • Parameters

          • v: string

          Returns string

    • args: any[]

    Returns string