View the activity log for a Tugboat Preview

Arguments

  • preview - Required
    The preview for which to obtain the activity log.

  • limit - Optional
    Only return this many log entries from the end of the log. If not specified, all log entries for the preview are returned.

  • index - Optional
    Every operation on a preview is logged individually and is given its own index. The most recent log always has an index of 0. The historical logs start at 1 for the oldest and count up from there. If no index is specified, a list of indexes with timestamps is returned

Example

socket.emit('tugboat', 'previews', 'log', args, callback);

Output

[
    [
        {
            "level": "verbose",
            "message": "Setting the preview state to \"ready\"",
            "timestamp": "2017-03-30T02:59:12.449Z",
            "preview": "58dc746831db000001942798"
        },
        {
            "level": "debug",
            "message": "Firing Event: tugboat.build.ready.before to git",
            "timestamp": "2017-03-30T02:59:12.452Z",
            "preview": "58dc746831db000001942798"
        }
    ],
    [
        {
            "level": "info",
            "message": "Already on 'master'\r\nYour branch is up-to-date with 'origin/master'.\r\n",
            "timestamp": "2017-03-30T02:58:59.942Z",
            "preview": "58dc746931db00000194279a"
        },
        {
            "level": "debug",
            "message": "Firing Event: tugboat.build.git.after to git",
            "timestamp": "2017-03-30T02:58:59.992Z",
            "preview": "58dc746931db00000194279a"
        }
    ]
]

Errors

  • 1015: No Preview ID Provided
    The required preview argument was not included in the request.

results matching ""

    No results matching ""