Description
When looking at the logs for a container, every line now starts with the [2K ASCII code. This is causing issues when I try to pipe logs to jq.
I managed to narrow down the issue to this change.
Steps To Reproduce
- Run a container that outputs json
- Run the following command:
docker compose logs --no-log-prefix <container> | jq
- Notice
jq can't parse the line: jq: parse error: Invalid numeric literal at line 1, column 2
Alternatively
- Run a container
- Run the following command:
docker compose logs --no-log-prefix <container> | hd -n 128
- Notice these 4 bytes at the start:
1b 5b 32 4b (.[2K
Compose Version
Docker Compose version v2.25.0-15-ge9dc8201
Docker Environment
n/a
Anything else?
n/a