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 }), });