Type Alias CustomLevelLogger<CustomLevels, UseOnlyCustomLevels>

CustomLevelLogger<CustomLevels, UseOnlyCustomLevels>: {
    customLevels: {
        [level in CustomLevels]: number
    };
    useOnlyCustomLevels: UseOnlyCustomLevels;
} & {
    [K in Exclude<Level, CustomLevels>]: UseOnlyCustomLevels extends true
        ? never
        : LogFn
} & {
    [level in CustomLevels]: LogFn
}

Type Parameters

  • CustomLevels extends string
  • UseOnlyCustomLevels extends boolean = boolean

Type declaration

  • customLevels: {
        [level in CustomLevels]: number
    }

    Define additional logging levels.

  • useOnlyCustomLevels: UseOnlyCustomLevels

    Use only defined customLevels and omit Pino's levels.