From 1659a6d88c5eda46e4c9573a3d6b467c5ccef684 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Wed, 3 Sep 2025 15:32:59 +0000 Subject: [PATCH] fix: Add custom levels to multistream to fix non-output Without custom levels added streams would not output if log level was custom (verbose) --- src/loggers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/loggers.ts b/src/loggers.ts index 9fbf8a2..83304d4 100644 --- a/src/loggers.ts +++ b/src/loggers.ts @@ -9,7 +9,7 @@ import { LogOptions } from "./types.js"; import {buildDestinationFile, buildDestinationRollingFile, buildDestinationStdout} from "./destinations.js"; -import {pino} from "pino"; +import {pino, levels} from "pino"; /** * Builds a Logger object for use in your application @@ -42,7 +42,7 @@ export const buildLogger = (defaultLevel: LogLevel, streams: LogLevelStreamEntry customLevels: CUSTOM_LEVELS, useOnlyCustomLevels: false, ...extras - }, pino.multistream(streams)) as Logger; + }, pino.multistream(streams, {levels: {...levels.values, ...CUSTOM_LEVELS}})) as Logger; plogger.labels = []; plogger.addLabel = function (value) { -- 2.51.2