Compatibility

The Logging API has been updated significantly for DC/OS 1.11 and later.

In versions of DC/OS prior to 1.11, task logs were available via files API. Now you can leverage the consolidated API for both component and task logs.

In versions of DC/OS prior to 1.11, node and component logs were managed by journald. However, the [Mesos task journald log sink was disabled due to journald performance issues. So container log files for older versions are only accessible via the Mesos task sandbox files API.

Discovery Endpoints

Master routes which are serving task logs are also called ‘discovery endpoints’. When the user makes a GET request to a discovery endpoint, the user is redirected to the agent node with the desired endpoint.

The parameters used in the request come from mesos state.json and are called “task metadata”.

DC/OS Logging follows the Server-Sent-Event specifications. It supports reading the log entry from a specific cursor position, if the client specifies a request header Last-Event-ID as defined in SSE specifications. Every log entry in SSE format contains an ID with a token ID: . This allows the client to know the current log entry and gives you the ability to resume logs consumption if it was interrupted.