File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import 'dotenv/config';
3
3
import { NestFactory } from '@nestjs/core' ;
4
4
import { SwaggerModule } from '@nestjs/swagger' ;
5
5
import { NestExpressApplication } from '@nestjs/platform-express' ;
6
- import { INestApplication , NestApplicationOptions } from '@nestjs/common' ;
6
+ import { INestApplication , Logger , NestApplicationOptions } from '@nestjs/common' ;
7
7
import * as bodyParser from 'body-parser' ;
8
8
import { GlobalExceptionFilter } from 'src/exceptions/global-exception.filter' ;
9
9
import { get , Config } from 'src/utils' ;
@@ -76,14 +76,13 @@ export default async function bootstrap(apiPort?: number): Promise<IApp> {
76
76
const logFileProvider = app . get ( LogFileProvider ) ;
77
77
78
78
await app . listen ( apiPort || port , host ) ;
79
- logger . log ( {
80
- message : `Server is running on http(s)://${ host } :${ port } ` ,
81
- context : 'bootstrap' ,
82
- } ) ;
79
+
80
+ const bootstrapLogger = new Logger ( 'boostrap' ) ;
81
+ bootstrapLogger . log ( `Server is running on http(s)://${ host } :${ port } ` ) ;
83
82
84
83
const gracefulShutdown = ( signal ) => {
85
84
try {
86
- logger . log ( `Signal ${ signal } received. Shutting down...` ) ;
85
+ bootstrapLogger . log ( `Signal ${ signal } received. Shutting down...` ) ;
87
86
logFileProvider . onModuleDestroy ( ) ;
88
87
} catch ( e ) {
89
88
// ignore errors if any
You can’t perform that action at this time.
0 commit comments