Skip to content
Advertisement

How to use –since option with docker logs command

I want to look at last 1 hour of docker container log using docker logs --since option. Which value I should provide for --since parameter?

Advertisement

Answer

as the help says

--since string Show logs since timestamp (e.g. 2013-01-02T13:23:37) or relative (e.g. 42m for 42 minutes

I would do

docker logs mycontainer_or_id --since 60m

This syntax is correct according to my active container

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement