Display command logs on boot error (#6414)

As per title
This commit is contained in:
Charles Bochet
2024-07-25 17:53:57 +02:00
committed by GitHub
parent b31153105f
commit d022837b5b
3 changed files with 23 additions and 22 deletions

View File

@ -1,8 +1,8 @@
import { CommandFactory } from 'nest-commander';
import { shouldFilterException } from 'src/engine/utils/global-exception-handler.util';
import { ExceptionHandlerService } from 'src/engine/integrations/exception-handler/exception-handler.service';
import { LoggerService } from 'src/engine/integrations/logger/logger.service';
import { shouldFilterException } from 'src/engine/utils/global-exception-handler.util';
import { CommandModule } from './command.module';
@ -18,6 +18,7 @@ async function bootstrap() {
};
const app = await CommandFactory.createWithoutRunning(CommandModule, {
logger: ['error', 'warn', 'log'],
bufferLogs: process.env.LOGGER_IS_BUFFER_ENABLED === 'true',
errorHandler,
serviceErrorHandler: errorHandler,