Closed CatsMiaow closed 3 years ago
Your logger has the context already specified in this line:
private readonly logger: Logger = new Logger(AppController.name);
so this:
this.logger.error('Test3', 'TestStack', 'TestContext');
will be interpreted as [message, message, stack]
instead.
This is the expected behavior.
I cloned typescript-starter and tested it.
https://github.com/nestjs/nest/blob/bddecac3a73e628dfe2a0202ea3000f47f0cc69e/packages/common/services/console-logger.service.ts#L176 It seems to contain
stack
insidemessages
.