Skip to content

Commit 0df910d

Browse files
ripcurld0Misty Stanley-Jones
authored andcommitted
Add a note regarding retrieving log messages when tty is enabled (docker#5321)
When running a container with tty enabled and setting the journald logging driver, you may see "blob data" instead of the real log message. That's because tty appends "\r" to the end of the log line, which isn't stripped by jorunald unless you specify the "--all" flag. Signed-off-by: Boaz Shuster <[email protected]>
1 parent 956fe59 commit 0df910d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

engine/admin/logging/journald.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ to return the log messages in JSON format.
100100
$ sudo journalctl -o json CONTAINER_NAME=webserver
101101
```
102102

103+
### View logs for a container with a TTY enabled
104+
105+
If TTY is enabled on a container you may see `[10B blob data]` in the output
106+
when retrieving log messages.
107+
The reason for that is that `\r` is appended to the end of the line and
108+
`journalctl` doesn't strip it automatically unless `--all` is set:
109+
110+
```bash
111+
$ sudo journalctl -b CONTAINER_NAME=webserver --all
112+
```
113+
103114
## Retrieve log messages with the `journal` API
104115

105116
This example uses the `systemd` Python module to retrieve container

0 commit comments

Comments
 (0)