Cloud Foundry logging
Page last updated:
This section contains information for debugging Cloud Foundry system components.
Component logging
In cf-deployment
, the components should all be configured in a similar way:
- All of the job’s log files are located in the directory
/var/vcap/sys/log/<job-name>
of the machine on which the job is running. - Any output written directly to the job’s stdout and stderr is written to
<job-name>.stdout.log
and<job-name>.stderr.log
, respectively. - Jobs might also write main logs to a file named
<job-name>.log
. - BOSH might also write logs for different lifecycle hooks to additional file paths, see BOSH Update Lifecycle for more details.
Log forwarding
BOSH VMs can be configured to forward component logs to remote syslog endpoints by applying the enable-component-syslog.yml ops file to a BOSH runtime config or manifest. The ops file requires some operator configuration (example), including the following variables:
syslog_address
: IP or DNS address of the syslog serversyslog_custom_rule
: Custom rsyslog rulessyslog_fallback_servers
: List of fallback servers to be used if the primary syslog server is downsyslog_permitted_peer
: Accepted fingerprint (SHA1) or name of remote peersyslog_port
: Port of the syslog server
Further configuration options can be found in the syslog_forwarder spec.
View the source for this page in GitHub