packagecloud:enterprise generates logging information which may be useful in the event of a bug or other issue with the software. Logs are generated to the /var/log/packagecloud directory. There are different logs for each of the various services within the packagecloud:enterprise instance.

Log location

Logs are generated to the /var/log/packagecloud directory.

Application Logging

You can adjust the log level of the packagecloud application by setting the following option in /etc/packagecloud/packagecloud.rb configuration file:

packagecloud_rails['log_level'] = 'error'

The available options are: debug, info, warn, error, fatal. The most verbose logging is "debug" and the least is "fatal" - we recommend using "error" which is the default value and offers a good trade off between verbosity and disk space. Application logs are generated to the /var/log/packagecloud/packagecloud-rails/ directory. There are individual files for various subsystems of the packagecloud:enterprise application.

Available log files and their purpose

There are many log files present in /var/log/packagecloud – the following list will attempt to include the most relevant files, their purpose, and what you can expect to find in them:

Application level logs

Metadata processing logs

Using logrotate

The /etc/packagecloud/packagecloud.rb file comes with options for setting up logrotate to handle automatic compression and deletion of log files generated by packagecloud:enterprise. The options you can specify in /etc/packagecloud/packagecloud.rb to control logrotate are:

##
## How many logs to keep around
##
logging['logrotate_rotate'] = 30
##
## Compress rotated logs
##
logging['logrotate_compress'] = "compress" # see 'man logrotate'

## Logrotate method (see 'man logrotate')
##
logging['logrotate_method'] = "copytruncate" # see 'man logrotate'
##
## Rotate based on frequency, like "daily", or, nil to rotate only on size
##
logging['logrotate_frequency'] = nil
##
## Rotate based on size
##
logging['logrotate_size'] = "100M"


Check the man page for logrotate for more detailed documentation on how this utility works. You can check the man page by running man logrotate from the command line or by visiting http://www.linuxcommand.org/man_pages/logrotate8.html for more information.