Overview

With each operation, the output of your Containers is collected as Logs. This includes changes to your resources such as scaling, deploying, updating environment variables, creating backups, etc.

Strictly speaking, stdout and stderr are captured. If you are using Docker locally, this is what you’d see when you run docker logs .... Most importantly, this means logs sent to files are not captured by Aptible logging, so when you deploy your Apps on Aptible, you should ensure you are logging to stdout or stderr, and not to log files.

Quick Access Logs

Aptible stores recent Logs for quick access. For long term retention of logs, you will need to set up a Log Drain.

App and Database logs can be accessed in real-time from the CLI using the aptible logs command. Upon executing this command, only the logs generated from that moment onward will be displayed.

Example:

aptible logs --app "$APP_HANDLE"
aptible logs --database "$DATABASE_HANDLE"

Log Integrations

Log Drains

Log Drains let you route Logs to logging destinations for reviewing, searching, and alerting. Log Drains support capturing logs for Apps, Databases, SSH sessions, and Endpoints.

Learn more about Log Drains

Log Archiving

Log Archiving lets you route Logs to S3 for business continuity and compliance. Log Archiving supports capturing logs for Apps, Databases, SSH sessions, and Endpoints.

Learn more about Log Archiving