Skip to content

Commit f3f324f

Browse files
Merge pull request #2467 from Tony133/chore/rename-code-snippets-logger
chore(techniques): updated code snippets in the section logger
2 parents 8f1b656 + 2ffa247 commit f3f324f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/techniques/logger.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Because application instantiation (`NestFactory.create()`) happens outside the c
138138
We can then instruct Nest to use the same singleton instance of `MyLogger` with the following construction:
139139

140140
```typescript
141-
const app = await NestFactory.create(ApplicationModule, {
141+
const app = await NestFactory.create(AppModule, {
142142
bufferLogs: true,
143143
});
144144
app.useLogger(app.get(MyLogger));
@@ -239,7 +239,7 @@ export class CatsService {
239239
Finally, instruct Nest to use an instance of the custom logger in your `main.ts` file as shown below. Of course in this example, we haven't actually customized the logger behavior (by extending the `Logger` methods like `log()`, `warn()`, etc.), so this step isn't actually needed. But it **would** be needed if you added custom logic to those methods and wanted Nest to use the same implementation.
240240

241241
```typescript
242-
const app = await NestFactory.create(ApplicationModule, {
242+
const app = await NestFactory.create(AppModule, {
243243
bufferLogs: true,
244244
});
245245
app.useLogger(new MyLogger());

0 commit comments

Comments
 (0)