Question · NestJS course · Module 6: Error Handling and Monitoring

Logging Configuration in main.ts

How do you set logging levels when creating a NestJS application?

Answer options

  • NestFactory.create(AppModule, { logger: ['error', 'warn', 'log'] })
  • app.setLogLevel(['error', 'warn'])
  • Logger.setLevel('debug')
  • NestFactory.createLogger(['error'])

You can check the correct answer by solving this task in the CodeWorlds game.