Skip to content

Commit 106c40a

Browse files
Update content/techniques/logger.md
1 parent 3bf7359 commit 106c40a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/techniques/logger.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ In the default logger implementation, `context` is printed in the square bracket
169169
[Nest] 19096 - 12/08/2019, 7:12:59 AM [NestFactory] Starting Nest application...
170170
```
171171

172-
If we supply a custom logger via `app.useLogger`, it will actually be used by Nest automatically.
173-
That means that our code remains implementation agnostic, while we can easily substitute the default logger for our custom one by calling `app.useLogger`.
174-
That way if we follow the steps from previous section and call `app.useLogger(app.get(MyLogger))`, the following calls to `this.logger.log` from `MyService` would result in calls to method `log` from `MyLogger` instance.
172+
If we supply a custom logger via `app.useLogger()`, it will actually be used by Nest internally. That means that our code remains implementation agnostic, while we can easily substitute the default logger for our custom one by calling `app.useLogger()`.
175173

176-
This should be suitable for most cases. But if you need more customization for the Logger (like adding and calling custom methods), please follow to the next section.
174+
That way if we follow the steps from the previous section and call `app.useLogger(app.get(MyLogger))`, the following calls to `this.logger.log()` from `MyService` would result in calls to method `log` from `MyLogger` instance.
175+
176+
This should be suitable for most cases. But if you need more customization (like adding and calling custom methods), move to the next section.
177177

178178
#### Injecting a custom logger
179179

0 commit comments

Comments
 (0)