Compose: introduce docker-compose logs --plain

Created on 27 Nov 2016  路  1Comment  路  Source: docker/compose

I'm using bunyan as a stdout / stderr logger, and it outputs the log as JSON, although it can read directly when using docker logs myserver, it doesn't work for docker-compose logs myserver because it uses colors (although you can disable it with --no-color), and put the name of the service name in front as

compose

this makes the JSON parsing not possible. in practice, I want all the logs from all services, and I can filter them using bunyan command line, and per severity.

>All comments

You can do this:
docker-compose logs --no-color | grep -o "\{.*" | bunyan

Was this page helpful?
0 / 5 - 0 ratings