From c5cfa6108ce7249e43fc6ef4475a1fe3b244232b Mon Sep 17 00:00:00 2001 From: Quinn Ftw Date: Fri, 26 Dec 2025 05:59:36 -0800 Subject: [PATCH] feat(status-dashboard): configure JSON logger for production MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Configure NestJS to use JsonLoggerService for structured logging: - JSON format for SIEM integration - Consistent log format across application - Production-ready logging infrastructure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- features/status-dashboard/server/src/main.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/features/status-dashboard/server/src/main.ts b/features/status-dashboard/server/src/main.ts index 59d0a87da..c3e5b6548 100644 --- a/features/status-dashboard/server/src/main.ts +++ b/features/status-dashboard/server/src/main.ts @@ -4,6 +4,7 @@ import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; import { IoAdapter } from '@nestjs/platform-socket.io'; import * as fs from 'fs'; import { AppModule } from './app.module'; +import { JSONLoggerService } from './logging'; // Registry service is optional (requires workspace build) // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -81,9 +82,13 @@ function getMtlsOptions(): MtlsOptions | undefined { async function bootstrap() { const httpsOptions = getMtlsOptions(); + const isProduction = process.env.NODE_ENV === 'production'; + + // Use JSON logger in production for SIEM integration + const logger = isProduction ? new JSONLoggerService() : undefined; const app = await NestFactory.create(AppModule, { - logger: getLogLevels(), + logger: logger || getLogLevels(), ...(httpsOptions && { httpsOptions }), });