返回介绍

3.5.11. log

发布于 2023-09-20 23:50:40 字数 8357 浏览 0 评论 0 收藏 0

Caution

Buildbot no longer supports Python 2.7 on the Buildbot master.

3.5.11. log

resource type: log
Attributes:
  • complete (boolean) – true if this log is complete and will not generate additional logchunks

  • logid (integer) – the unique ID of this log

  • name (string) – the name of this log (e.g., err.html)

  • num_lines (integer) – total number of line of this log

  • slug (identifier) – the “slug”, suitable for use in a URL, of this log (e.g., err_html)

  • stepid (integer) – id of the step containing this log

  • type (identifier) – log type, identified by a single ASCII letter; see logchunk for details

example

{
    "logid": 60,
    "name": "stdio",
    "slug": "stdio",
    "stepid": 50,
    "complete": false,
    "num_lines": 0,
    "type": "s"
}

A log represents a stream of textual output from a step. The actual output is encoded as a sequence of logchunk resources. In-progress logs append logchunks as new data is added to the end, and event subscription allows a client to “follow” the log.

Each log has a “slug” which is unique within the step, and which can be used in paths. The slug is generated by

All update methods are available as attributes of master.data.updates.

class buildbot.data.logs.Log
path: /builders/{builderid_or_buildername}/builds/{build_number}/steps/{step_name}/logs
Path Keys:
  • builderid_or_buildername (number|identifier) – the ID or name of the builder

  • build_number (number) – the number of the build within the builder

  • step_name (identifier) – the slug name of the step

This path selects all logs for the given step.

GET
returns

collection of log

path: /builders/{builderid_or_buildername}/builds/{build_number}/steps/{step_name}/logs/{log_slug}
Path Keys:
  • builderid_or_buildername (number|identifier) – the ID or name of the builder

  • build_number (number) – the number of the build within the builder

  • step_name (identifier) – the slug name of the step

  • log_slug (identifier) – the slug name of the log

GET
returns

collection of log

path: /builders/{builderid_or_buildername}/builds/{build_number}/steps/{step_number}/logs
Path Keys:
  • builderid_or_buildername (number|identifier) – the ID or name of the builder

  • build_number (number) – the number of the build within the builder

  • step_number (number) – the number of the step

This path selects all log of a specific step

GET
returns

collection of log

path: /builders/{builderid_or_buildername}/builds/{build_number}/steps/{step_number}/logs/{log_slug}
Path Keys:
  • builderid_or_buildername (number|identifier) – the ID or name of the builder

  • build_number (number) – the number of the build within the builder

  • step_number (number) – the number of the step

  • log_slug (identifier) – the slug name of the log

This path selects one log of a specific step

GET
returns

collection of log

path: /builds/{buildid}/steps/{step_number_or_name}/logs
Path Keys:
  • buildid (number) – the id of the build

  • step_number_or_name (identifier|number) – the name or number of the step

This path selects all logs of a step of a build

GET
returns

collection of log

path: /builds/{buildid}/steps/{step_number_or_name}/logs/{log_slug}
Path Keys:
  • buildid (number) – the id of the build

  • step_number_or_name (identifier|number) – the name or number of the step

  • log_slug (identifier) – the slug name of the log

This path selects one log of a a specific step

GET
returns

collection of log

path: /logs/{logid}
Path Keys:

logid (number) – the id of the log

This path selects one log

GET
returns

collection of log

path: /steps/{stepid}/logs
Path Keys:

stepid (number) – the id of the step

This path selects all logs for the given step

GET
returns

collection of log

path: /steps/{stepid}/logs/{log_slug}
Path Keys:
  • stepid (number) – the id of the step

  • log_slug (identifier) – the slug name of the log

GET
returns

collection of log

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文