I create a extended logger based like the answer of Ian: Issue with using Azure Applications Insights sdk with NestJS logger
NestJS old version:
export class MyLogger extends Logger {
Normally you can set the log-level for the nestjs logger:
const app = await NestFactory.create(AppModule, {
logger: ['error', 'warn'],
});
But how can i set the LogLevels if i extend the Logger.
const app = await NestFactory.create(AppModule);
const logger = await app.resolve(MyLogger);
logger.setClient(appInsights.defaultClient);
app.useLogger(logger);