mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 16:44:49 -04:00
Logging: Remove NestConsoleLoggerService
This is not necessary anymore, because we can inject ConsoleLoggerService directly. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
8dd3a3d7dd
commit
697ca823d5
5 changed files with 12 additions and 50 deletions
10
src/main.ts
10
src/main.ts
|
@ -4,20 +4,22 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { LogLevel, ValidationPipe } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { NestExpressApplication } from '@nestjs/platform-express';
|
||||
import { AppModule } from './app.module';
|
||||
import { AppConfig } from './config/app.config';
|
||||
import { MediaConfig } from './config/media.config';
|
||||
import { NestConsoleLoggerService } from './logger/nest-console-logger.service';
|
||||
import { setupPrivateApiDocs, setupPublicApiDocs } from './utils/swagger';
|
||||
import { BackendType } from './media/backends/backend-type.enum';
|
||||
import { ConsoleLoggerService } from './logger/console-logger.service';
|
||||
|
||||
async function bootstrap(): Promise<void> {
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule);
|
||||
const logger = await app.resolve(NestConsoleLoggerService);
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
|
||||
logger: ['error', 'warn', 'log'] as LogLevel[],
|
||||
});
|
||||
const logger = await app.resolve(ConsoleLoggerService);
|
||||
logger.log('Switching logger', 'AppBootstrap');
|
||||
app.useLogger(logger);
|
||||
const configService = app.get(ConfigService);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue