dotnet / Docker.DotNet

:whale: .NET (C#) Client Library for Docker API

Home Page:https://www.nuget.org/packages/Docker.DotNet/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I need to get logs last 10 min in c#

kurubavinodkumar opened this issue · comments

I need to get log last 10 min . I am not able to find a solution

example :
var parameters = new ContainerLogsParameters
{
ShowStdout = true,
ShowStderr = true,
Timestamps = true,
Since = "1"
};

Stream logStream = await (client.Containers.GetContainerLogsAsync(container.ID, parameters, default)).ConfigureAwait(false);

in above example what should I pass since value

The since and until parameter receives a UNIX timestamp. Here is an example. The count starts at the Unix Epoch.