Switch to using the new custom logger

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-09-27 21:48:42 +02:00
parent b256fc8b36
commit e37722a56a
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
24 changed files with 83 additions and 34 deletions

View file

@ -2,9 +2,13 @@ import { ValidationPipe } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { AppModule } from './app.module';
import { NestConsoleLoggerService } from './logger/nest-console-logger.service';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const logger = await app.resolve(NestConsoleLoggerService);
logger.log('Switching logger', 'AppBootstrap');
app.useLogger(logger);
const swaggerOptions = new DocumentBuilder()
.setTitle('HedgeDoc')
@ -21,6 +25,7 @@ async function bootstrap() {
}),
);
await app.listen(3000);
logger.log('Listening on port 3000', 'AppBootstrap');
}
bootstrap();