Skip to content

Commit db013bf

Browse files
prateekatknoldusanalytically
authored andcommitted
updated docs with getContext
1 parent a3cc747 commit db013bf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,12 @@ val logger = Logger.takingImplicit[CorrelationId]("test")
127127
logger.info("Test") // takes implicit correlationId and logs "ID Test"
128128
```
129129

130-
It's possible to use `MDC` through `CanLog` without any troubles with execution context.
130+
If you want to extract the context object associated with your logger i.e. `correlationId` here, use `getContext`.
131+
```scala
132+
val context = logger.canLogEv.getContext
133+
```
134+
135+
It's also possible to use `MDC` through `CanLog` without any troubles with execution context.
131136

132137
```scala
133138
case class CorrelationId(value: String)

0 commit comments

Comments
 (0)