你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

ContainersOperationsExtensions.ListLogs 方法

定义

获取指定容器实例的日志。

public static Microsoft.Azure.Management.ContainerInstance.Models.Logs ListLogs (this Microsoft.Azure.Management.ContainerInstance.IContainersOperations operations, string resourceGroupName, string containerGroupName, string containerName, int? tail = default, bool? timestamps = default);
static member ListLogs : Microsoft.Azure.Management.ContainerInstance.IContainersOperations * string * string * string * Nullable<int> * Nullable<bool> -> Microsoft.Azure.Management.ContainerInstance.Models.Logs
<Extension()>
Public Function ListLogs (operations As IContainersOperations, resourceGroupName As String, containerGroupName As String, containerName As String, Optional tail As Nullable(Of Integer) = Nothing, Optional timestamps As Nullable(Of Boolean) = Nothing) As Logs

参数

operations
IContainersOperations

此扩展方法的操作组。

resourceGroupName
String

资源组的名称。

containerGroupName
String

容器组的名称。

containerName
String

容器实例的名称。

tail
Nullable<Int32>

要从容器实例日志的尾部显示的行数。 如果未提供,则显示所有可用日志最多 4mb。

timestamps
Nullable<Boolean>

如果为 true,则在每个日志输出行的开头添加时间戳。 如果未提供,则默认为 false。

返回

注解

获取指定资源组和容器组中指定容器实例的日志。

适用于