mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 16:44:49 -04:00
Switch to using the new custom logger
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
b256fc8b36
commit
e37722a56a
24 changed files with 83 additions and 34 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue