Logs

Viewing system logs

The system produces two sets of logs:

Application (django) logs

Django emits operational logs to stdout and can be viewed with Docker or via dokku.

To view a snapshot of recent logs with dokku, run:

dokku logs APP

To view a continuous stream of logs, run:

dokku logs APP -t

You can view logs for a particular process (web or tasks), run:

# background tasks
dokku logs APP -p tasks -t

# web requests
dokku logs APP -p web -t

Viewing logs using docker

The website processes are normal docker containers. You can view the docker logs using standard docker commands, for example:

Find the ID of the docker container you want to check the logs for:

docker ps

View the logs for that container

docker logs -f --since 10m abc123

Nginx access logs

Nginx writes access logs for all requests to /var/log/nginx/APP-access.log. View them with a command such as:

tail -f /var/log/nginx/APP-access.log

These logs are rotated according to your installed nginx log rotation configuration.

Nginx error logs

Nginx writes error logs to /var/log/nginx/APP-error.log. View them with a command such as:

tail -f /var/log/nginx/APP-error.log

These logs are rotated according to your installed nginx log rotation configuration.

Last updated