chore: reduce polling log noise across backend and nginx (#336)

This commit is contained in:
Daniel Volz
2026-02-27 00:54:21 +01:00
committed by GitHub
parent 19ba4bb7d2
commit 6b27d234d9
13 changed files with 226 additions and 28 deletions
+9 -1
View File
@@ -58,10 +58,18 @@ function sanitizeCorrelationId(headers: IncomingHttpHeaders): string | null {
}
function buildLoggerOptions(level: string) {
return {
const base = {
level,
timestamp: () => `,"time":"${new Date().toISOString()}"`,
};
// Human-readable logs in development; structured JSON in production/test
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test") {
return {
...base,
transport: { target: "pino-pretty", options: { translateTime: "SYS:yyyy-mm-dd HH:MM:ss.l" } },
};
}
return base;
}
/** Create and configure Fastify app (without starting) */