Service Logs provides a simple integrated interface for logging from any Hook service. This integrated logging service is can be helpful for Service debugging or monitoring.

Writing to Hook Logs

To write to a Hook's logging output, simply call console.log('hello logging'); from inside the Hook.

Calling console.log in the Hook will automatically make the console log statement available as a logging entry.

Logs API

Accessing Hook Logs

To access the logs for a Hook simply attach /logs to the end of the Hook service url.

For example:

The logging endpoint for a Hook will intelligently respond based on the incoming HTTP Accept Header.


For Private Hooks, service logs are private. In order to access them from a third-party service, you'll need to generate a valid API Access Key with the logs::read role.

Streaming logs

To access streaming logs, request the logging endpoint with an Accept Header value of */*

Example: curl -N

Plain Text Logs

To access plain text logs, request the logging endpoint with an Accept Header value of text/plain

Example: curl -H "Accept: text/plain"

Clear / Flush Logs

To flush or clear the logs for a Hook, simply append ?flush=true to the logging endpoint ( valid session or hook_private_key required ).

Client SDK

Using the Client SDK to access events is simple

Here are two examples of using the Client SDK. See SDK for more information

var sdk = require("");
var client = sdk.createClient({});
// callback style
client.logs.get('marak/echo', function (err, logs) {
  console.log(err, logs);
// streaming'marak/echo', process.stdout);