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

获取容器日志

获取容器的日志。

获取应用程序的给定代码包的容器的日志。

请求

方法 请求 URI
GET /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabricMesh/applications/{applicationName}/services/{serviceName}/replicas/{replicaName}/codePackages/{codePackageName}/logs?api-version=2018-07-01-preview&tail={tail}

参数

名称 类型 必须 位置
subscriptionId string 路径
resourceGroupName 字符串 路径
applicationName 字符串 路径
serviceName 字符串 路径
replicaName 字符串 路径
codePackageName 字符串 路径
api-version 字符串 查询
tail integer 查询

subscriptionId

类型:字符串
必需:是

客户订阅标识符


resourceGroupName

类型:字符串
必需:是

Azure 资源组名称


applicationName

类型:字符串
必需:是

应用程序的标识。


serviceName

类型:字符串
必需:是

服务的标识。


replicaName

类型:字符串
必需:是

服务的标识副本 (replica) 。


codePackageName

类型:字符串
必需:是

代码包的名称。


api-version

类型:字符串
必需:是
默认

API 的版本。 此参数是必需的,其值必须为 2018-07-01-preview


tail

类型:整数
必需:否

要从日志末尾显示的行数。 默认值为 100。

响应

HTTP 状态代码 说明 响应架构
200 (正常) 成功的响应
ContainerLogs
所有其他状态代码 错误
ErrorModel

示例

ContainerLogsList

请求

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sbz_demo/providers/Microsoft.ServiceFabricMesh/applications/sbzDocApp/services/sbzDocService/replicas/0/codePackages/sbzDocCode/logs?api-version=2018-07-01-preview

200 响应

正文
{
  "content": " * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)\n * Downloading style https://assets-cdn.github.com/assets/frameworks-8f281eb0a8d2308ceb36e714ba3c3aec.css\n * Downloading style https://assets-cdn.github.com/assets/github-a698da0d53574b056d3c79ac732d4a70.css\n * Downloading style https://assets-cdn.github.com/assets/site-83dc1f7ebc9c7461fe1eab799b56c4c4.css\n * Cached all downloads in /root/.grip/cache-4.5.2\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET / HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/frameworks-8f281eb0a8d2308ceb36e714ba3c3aec.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/site-83dc1f7ebc9c7461fe1eab799b56c4c4.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/asset/github-a698da0d53574b056d3c79ac732d4a70.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:02] \"GET /__/grip/static/octicons/octicons.css HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:03] \"GET /__/grip/static/octicons/octicons.woff2?ef21c39f0ca9b1b5116e5eb7ac5eabe6 HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:03] \"GET /__/grip/static/favicon.ico HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:05] \"GET /seabreeze-index.md HTTP/1.1\" 200 -\n167.220.0.83 - - [06/Apr/2018 07:16:09] \"GET /seabreeze-api-application_get.md HTTP/1.1\" 200 -\n"
}