Application Log Streaming
Page last updated:
Warning: Pivotal Cloud Foundry (PCF) v2.3 is no longer supported because it has reached the End of General Support (EOGS) phase as defined by the Support Lifecycle Policy. To stay up to date with the latest software and security updates, upgrade to a supported version.
By binding an application to an instance of an applicable service, Cloud Foundry will stream logs for the bound application to the service instance.
- Logs for all apps bound to a log-consuming service instance will be streamed to that instance
- Logs for an app bound to multiple log-consuming service instances will be streamed to all instances
To enable this functionality, a service broker must implement the following:
In the catalog endpoint, the broker must include
requires: syslog_drain. This minor security measure validates that a service returning a
syslog_drain_urlin response to the bind operation has also declared that it expects log streaming. If the broker does not include
requires: syslog_drain, and the bind request returns a value for
syslog_drain_url, Cloud Foundry will return an error for the bind operation.
In response to a bind request, the broker should return a value for
syslog_drain_url. The syslog URL has a scheme of syslog, syslog-tls, or https and can include a port number. For example:
How does it work?
- Service broker returns a value for
syslog_drain_urlin response to bind
- Loggregator periodically polls an internal Cloud Controller endpoint for updates
- Upon discovering a new
syslog_drain_url, Loggregator identifies the associated app
- Loggregator streams app logs for that app to the locations specified by the service instances’
Users can manually configure app logs to be streamed to a location of their choice using User-provided Service Instances. For details, see Using Third-Party Log Management Services.