Skip to content

Commit

Permalink
war with pino again
Browse files Browse the repository at this point in the history
  • Loading branch information
Enity committed May 9, 2024
1 parent c3a14bf commit 6a2024f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/starter/starter-app.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { setTimeout } from 'timers/promises';
import type { INestApplication, Logger as NestLogger } from '@nestjs/common';
import { ValidationPipe } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
Expand Down Expand Up @@ -74,6 +75,10 @@ export const startStarterApp = async <T extends NestStarterConfig>(
await app.listen(config.http.port, '0.0.0.0');
const appUrl = await app.getUrl();

// ugly solution for pino logging stack issue
// toplevel logger is not working properly and ships logs with delay
await setTimeout(1);

logger.log(`Listening on ${appUrl}`, loggerContext);

if (config.swagger.enabled) {
Expand Down

0 comments on commit 6a2024f

Please sign in to comment.