Skip to content

Commit 71a073b

Browse files
Polish code samples on container logs so that they are easier to copy & paste (#5038)
1 parent affee6c commit 71a073b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/features/container_logs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ By default both standard out and standard error will both be emitted at INFO lev
4040
Standard error may be emitted at ERROR level, if desired:
4141

4242
```java
43-
Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(log).withSeparateOutputStreams()
43+
Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(LOGGER).withSeparateOutputStreams();
4444
```
4545

4646
The [Mapped Diagnostic Context (MDC)](http://logback.qos.ch/manual/mdc.html) for emitted messages may be configured using the `withMdc(...)` option:
4747

4848
```java
49-
Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(log).withMdc("key", "value")
49+
Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(LOGGER).withMdc("key", "value");
5050
```
5151

5252
or using an existing map of key-value pairs:
5353

5454
```java
55-
Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(log).withMdc(map)
55+
Slf4jLogConsumer logConsumer = new Slf4jLogConsumer(LOGGER).withMdc(map);
5656
```
5757

5858
### Capturing container output as a String

0 commit comments

Comments
 (0)