Aptible PaaS logoDocs

Logs

Logs collect the output of your Containers. Aptible provides logs in three forms:

  • CLI Logs: Logs available in the CLI, best for accessing recent App & Database logs on the fly
  • Log Drains: Logs routed to a destination of your choice, best for searching and alerting
  • Log Archiving: Logs routed to S3, best for business continuity and compliance
🧠 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.

CLI Logs

App and Database logs can be accessed in real-time from the CLI using the aptible logs command. For example:

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

Please note that upon executing this command, only the logs generated from that moment onward will be displayed.

📘 aptible logs does not retain logs for the long term. If you have a requirement to retain logs, you will need to set up a Log Drain.

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. Refer to Log Drains for more information.

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. Refer to Log Archiving for more information.