Printing timestamps in Docker Compose logs

I can see the logs web

since docker-compose logs web

, but I would like to add timestamps to these messages because now they are completely out of context (not sure when the event happened). I tried docker-compose logs -t web

it but it looks like Docker Compose doesn't know this flag.

Do you have any ideas on how to timestamp Docker Compose logs?

+3


source to share


2 answers


docker-compose

now supports an argument -t

as specified by Ittiel.



+7


source


docker-compose version 1.8.0 supports logs, you can use:



docker-compose logs -t

      

+10


source







All Articles