Skip to content

logger: LogLevels documentation and behavior is not clear #3306

@NelsonLamprecht

Description

@NelsonLamprecht

The logging behavior as documented by this snippet on the logging techniques page:


const app = await NestFactory.create(AppModule, {
  logger: ['error', 'warn'],
});
await app.listen(process.env.PORT ?? 3000);

doesn't convey the observed behavior that when the logging level is set to just

['log']

you'll actually get all log,warn,error and fatal log entries.

There seems to be an inherited, cascading nature such that debug levels would include log,warn,error,fatal but that is not obviously documented that I can see.

I'd like to confirm that behavior and intent and then update the documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions