pyfarm.agent.http.api.tasklogs module

class pyfarm.agent.http.api.tasklogs.TaskLogs[source]

Bases: pyfarm.agent.http.api.base.APIResource

get(**kwargs)[source]

Get the contents of the specified task log. The log will be returned in CSV format with the following fields:

  • ISO8601 timestamp
  • Stream number (0 == stdout, 1 == stderr)
  • Line number
  • Parent process ID
  • Message the process produced

The log file identifier is configurable and relies on the jobtype_task_log_filename configuration option. See the configuration documentation for more information about the default value.

GET /api/v1/tasklogs/<identifier> HTTP/1.1

Request

GET /api/v1/tasklogs/<identifier> HTTP/1.1

Response

HTTP/1.1 200 OK
Content-Type: text/csv

2015-05-07T23:42:53.730975,0,15,42,Hello world
Statuscode 200:The log file was found, it’s content will be returned.