Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(logger): honour PINO_LOG_LEVEL below info

Calvin2a7d032f834c
diff --git a/backend/src/lib/logger/logger.ts b/backend/src/lib/logger/logger.ts
index bf446835c0..9b985395c6 100644
--- a/backend/src/lib/logger/logger.ts
+++ b/backend/src/lib/logger/logger.ts
@@ -109,7 +109,10 @@ const extractOrgId = () => {
export const initLogger = () => {
const targets: pino.TransportMultiOptions["targets"][number][] = [
{
- level: "info",
+ // Follows the same env var as the logger instance below. A transport target filters
+ // independently of the logger, so pinning this to info silently discarded every debug
+ // record no matter what PINO_LOG_LEVEL said.
+ level: process.env.PINO_LOG_LEVEL || "info",
target: "pino/file",
options: {
destination: 1,