Cloud 66

Logging

Cloud 66 makes it easy to handle your stack logs

Contents

About logging with Cloud 66

When Cloud 66 deploys your servers, we also configure the logging for various services on your server. There are several logs available for different parts of your server. Depending on the specifics of your application, log names and directories may vary. The information below applies to most applications.

Docker stacks

Given the ephemeral nature of containers, we recommend you use the log_folder directive to persist container logs on your host, so that they don’t disappear when the container stops. By default, any folder specified with log_folder will be available on the host under /var/log/containers/<service_name>, for example:

services:
    <service_name>:
        log_folder: /var/deploy/app/log

Ruby stacks

Web logs

Web logs are stored in $STACK_PATH/log:

  • Web logger:
    $STACK_PATH/log/<environment>.log
  • Nginx error log:
    $STACK_PATH/log/nginx_error.log

If you are using a custom web server, such as Unicorn, you can find your web server bluepill logs in /tmp/web_server_bluepill.log.

Background processes

Logs for background processes can also be found in $STACK_PATH/log, and depend on the name of the process:

  • Process log:
    $STACK_PATH/log/user_<name>.log
  • Process bluepill log:
    $STACK_PATH/log/user_<name>.pill

Other

  • Auth requests, Fail2Ban etc:
    /var/log
  • Nginx access and errors:
    /opt/nginx/logs

Log rotation

Your logs in $STACK_PATH/log and /var/log are automatically rotated on a daily basis into a sub-directory called archive/ in each respective directory. These logs are compressed, and can be uncompressed with the following command: gzip -d <log_file>.log.gz.