Cloud Foundry logging

Page last updated:

This section contains information for debugging Cloud Foundry system components.

Component logging

The Cloud Foundry components share a common interface for configuring logs. For more information, see the Cloud Controller, or for Steno, the logging library that Cloud Foundry components use.

In cf-deployment, the components are all configured in a similar way:

  • All of the job’s log files are located in the directory /var/vcap/sys/log of the machine on which the job is running.
  • The job’s main logs are written to a file named <job-name>.log.
  • Any output written directly to the job’s stdout and stderr is written to <job-name>.stdout.log and <job-name>.stderr.log, respectively.

Database migrations

For the Cloud Controller, database migration logs are written to db_migrate.stdout.log and db_migrate.stderr.log in the same directory.

Log forwarding

Each BOSH job in cf-deployment includes a job named metron_agent. Metron itself acts as a forwarding agent for Doppler within the Loggregator metric system, but it also includes a template for configuring the rsyslogd daemon to forward logs to a remote machine. The syslog_daemon_config properties include:

  • syslog_daemon_config.address: the IP address (or DNS name) of a remote system that should receive component logs from this VM
  • syslog_daemon_config.port: the port on which the log recipient is listening
  • syslog_daemon_config.transport: the protocol over which logs should be sent (one of tcp or udp); defaults to tcp

For example, to use UDP as the syslog transport, the manifest is similar to the following: yaml properties: syslog_daemon_config: address: address.of.your.syslog.receiver port: 54321 transport: udp

Cloud Foundry no longer provides a component in cf-deployment for aggregating syslog messages from Cloud Foundry components.

View the source for this page in GitHub