feat: server log streaming via SSE for desktop log panel

- LogStreamService: singleton that extends ConsoleLogger, captures all
  NestJS log output into an RxJS Subject while preserving stdout
- main.ts: uses LogStreamService.instance as app logger
- supervisor.controller.ts: new @Sse('logs/stream') endpoint pipes
  log entries (timestamp, level, context, message) to connected clients

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-17 08:22:11 +05:30
parent 9a016a2ed0
commit 96ae867288
3 changed files with 66 additions and 1 deletions

View File

@@ -3,9 +3,11 @@ import type { NestExpressApplication } from '@nestjs/platform-express';
import { join } from 'path';
import { AppModule } from './app.module';
import { ConfigService } from '@nestjs/config';
import { LogStreamService } from './logging/log-stream.service';
async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule);
const logger = LogStreamService.instance;
const app = await NestFactory.create<NestExpressApplication>(AppModule, { logger });
const config = app.get(ConfigService);
app.enableCors({