Log drains
A log drain ships every line your app writes to stdout/stderr to an external destination, in near-real-time. Configure once, and dokku's logspout handles forwarding.
Add a drain
$ ssh dokku@<stack-ip> logs:set-property <app> logspout-server \
syslog+tls://logs5.papertrailapp.com:12345
$ ssh dokku@<stack-ip> logs:set-property <app> logspout-router custom_routing
Or via OwnStack's logdrain integration if your control plane has it enabled — check the dashboard's Logs → Drains tab.
Supported endpoints
| Provider | URL form |
|---|---|
| Papertrail | syslog+tls://logsN.papertrailapp.com:PORT |
| Datadog | http://http-intake.logs.datadoghq.com/v1/input/<api-key> |
| Splunk HEC | http://<splunk-host>:8088/services/collector/raw?token=<token> |
| Loggly | syslog+tls://logs-01.loggly.com:6514 |
| Generic syslog | syslog://<host>:<port> (UDP), syslog+tls:// (TLS) |
| Generic HTTPS | https://<your-endpoint> — your service must accept JSON-per-line POSTs. |
OwnStack's logdrain app
If you want to host your own log aggregator, OwnStack ships a logdrain app — a tiny ingest service that writes to Postgres or files. See ownstack-org/logdrain for the deploy. Useful for compliance setups where logs must stay in your environment.
What's in a log line
Each forwarded line includes:
- Timestamp
- Hostname (the stack)
- Container name (e.g.
my-app.web.1) - The original log line from your app
Filtering
By default, logspout forwards every line from every container. To filter, configure ROUTE_* options on the dokku-logspout container — see the dokku-logspout plugin docs.