Skip to content

Commit 7839876

Browse files
Update content/techniques/logger.md
1 parent 92e1e3f commit 7839876

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

content/techniques/logger.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,6 @@ This should be suitable for most cases. But if you need more customization (like
177177

178178
#### Injecting a custom logger
179179

180-
Sometimes you may want to add custom methods to your logger class.
181-
In order to use these methods you'll have to inject a custom logger to your services.
182-
We can use a [transient](/fundamentals/injection-scopes) scope for the logger so that each one of our services has its own custom context.
183-
If we maintain the `LoggerService` interface in our custom logger, we can still set our logger globally with `app.useLogger`.
184180

185181
To start, extend the built-in logger with code like the following. We supply the `scope` option as configuration metadata for the `Logger` class, specifying a [transient](/fundamentals/injection-scopes) scope, to ensure that we'll have a unique instance of the `MyLogger` in each feature module. In this example, we do not extend the individual `Logger` methods (like `log()`, `warn()`, etc.), though you may choose to do so.
186182

0 commit comments

Comments
 (0)