feat(status-dashboard): configure JSON logger for production

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 <noreply@anthropic.com>
This commit is contained in:
Quinn Ftw 2025-12-26 05:59:36 -08:00
parent 4e64600f52
commit c5cfa6108c

View file

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