#Setting the log levels using ConfigService

2 messages · Page 1 of 1 (latest)

long widget
#

WHat is the best way to set the log levels using values from the ConfigService?

light trail
#
const app = await NestFactory.create(AppModule, {
  bufferLogs: true,
})

const configService = app.get(ConfigService)
// use configService above to retrieve the log levels list to use bellow 
app.useLogger(['debug', 'error'])