View the activity log for a Tugboat Service

Arguments

  • service - Required
    The service for which to obtain the log.

  • limit - Optional
    Only return this many log entries from the end of the log. If not specified, all log entries for the service 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', 'services', 'log', args, callback);

Output

An array of log messages for the requested services.

[
    [
        {
            "level": "info",
            "message": "*** Running /etc/rc.local...",
            "service": "58dc8e4af339460001e5a97b"
        },
        {
            "level": "info",
            "message": "*** Booting runit daemon...",
            "service": "58dc8e4af339460001e5a97b"
        },
        {
            "level": "info",
            "message": "*** Runit started as PID 7",
            "service": "58dc8e4af339460001e5a97b"
        }
    ],
    [
        {
            "level": "info",
            "message": "*** Running /etc/rc.local...",
            "service": "58dc8e4af339460001e5a97a"
        },
        {
            "level": "info",
            "message": "*** Booting runit daemon...",
            "service": "58dc8e4af339460001e5a97a"
        },
        {
            "level": "info",
            "message": "*** Runit started as PID 6",
            "service": "58dc8e4af339460001e5a97a"
        }
    ]
]

Errors

  • 1017: No Service ID Provided
    The required service argument was not included in the request.

results matching ""

    No results matching ""