Managing log files

Overview

When Cloud 66 provisions servers, we automatically configure logging for various services. There are several logs available for different server components. Depending on the specifics of your application, log names and directories may vary. The information below is for a typical case.

Containerized applications

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

Background processes

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

Other

Log rotation

Your logs in $STACK_PATH/log and /var/log are automatically rotated on a daily basis and by default kept for 14 days 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.

Note

You can set the frequency and the number of rotations to be kept using toolbelt.