ContainerLogsOptions Class

Selects the log entries returned by TemporaryContainer.GetLogsAsync.

public sealed class ContainerLogsOptions

Constructors

NameDescription
ContainerLogsOptions()Initializes a new instance of the ContainerLogsOptions class, which returns every entry and follows the new ones.

ContainerLogsOptions()

ContainerLogsOptions.cs

Initializes a new instance of the ContainerLogsOptions class, which returns every entry and follows the new ones.

public ContainerLogsOptions()

Properties

NameDescription
FollowGets or sets a value indicating whether the stream keeps returning new entries until the container stops or the enumeration is cancelled. The default value is true.
IncludeStandardErrorGets or sets a value indicating whether the entries written to the standard error are returned. The default value is true.
IncludeStandardOutputGets or sets a value indicating whether the entries written to the standard output are returned. The default value is true.
SinceGets or sets the time of the oldest entry to return. Entries written at exactly this time are returned.
TailGets or sets the number of entries to return from the end of the logs, or null to return all of them.
UntilGets or sets the time of the newest entry to return. Entries written at exactly this time are returned.

Gets or sets a value indicating whether the stream keeps returning new entries until the container stops or the enumeration is cancelled. The default value is true.

public bool Follow { get; set; }

Property value

bool

IncludeStandardError

ContainerLogsOptions.cs

Gets or sets a value indicating whether the entries written to the standard error are returned. The default value is true.

public bool IncludeStandardError { get; set; }

Property value

bool

IncludeStandardOutput

ContainerLogsOptions.cs

Gets or sets a value indicating whether the entries written to the standard output are returned. The default value is true.

public bool IncludeStandardOutput { get; set; }

Property value

bool

Gets or sets the time of the oldest entry to return. Entries written at exactly this time are returned.

public DateTimeOffset? Since { get; set; }

Property value

DateTimeOffset?

Remarks

The time is compared with the timestamps the runtime records, using the clock of the runtime. Not supported by the Apple container runtime, which does not record timestamps.

Gets or sets the number of entries to return from the end of the logs, or null to return all of them.

public int? Tail { get; set; }

Property value

int?

Remarks

When ContainerLogsOptions.Since or ContainerLogsOptions.Until is set too, the runtime takes the last entries first, then drops the ones outside the time range.

Gets or sets the time of the newest entry to return. Entries written at exactly this time are returned.

public DateTimeOffset? Until { get; set; }

Property value

DateTimeOffset?

Remarks

The time is compared with the timestamps the runtime records, using the clock of the runtime. Not supported by the Apple container runtime, which does not record timestamps.