File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -12,18 +12,17 @@ import { ConfigurationService } from './configuration/configuration.service';
1212import { setupDocs } from './docs' ;
1313
1414async function bootstrap ( ) {
15- const logger = new JSONLogger ( null , { debug : true , verbose : true } ) ;
16- const app = await NestFactory . create < NestExpressApplication > ( AppModule , { logger } ) ;
17-
18- app . enableShutdownHooks ( ) ;
19-
15+ const app = await NestFactory . create < NestExpressApplication > ( AppModule , {
16+ bufferLogs : true
17+ } ) ;
2018 const configurationService = app . get ( ConfigurationService ) ;
21- logger . setOptions ( {
19+ const logger = new JSONLogger ( null , {
2220 debug : configurationService . get ( 'DEBUG' ) ,
2321 verbose : configurationService . get ( 'VERBOSE' )
2422 } ) ;
25-
23+ app . useLogger ( logger ) ;
2624 app . enableCors ( ) ;
25+ app . enableShutdownHooks ( ) ;
2726 app . enableVersioning ( {
2827 defaultVersion : '1' ,
2928 type : VersioningType . URI
You can’t perform that action at this time.
0 commit comments