-
Notifications
You must be signed in to change notification settings - Fork 61
/
app-log-streaming.html.md.erb
39 lines (27 loc) · 2.25 KB
/
app-log-streaming.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
title: App Log streaming
owner: Core Services
---
When you bind an application to an instance of an applicable service, Cloud Foundry streams logs for the
bound application to the service instance.
- Logs for all apps bound to a log-consuming service instance are streamed to that instance.
- Logs for an app bound to multiple log-consuming service instances are streamed to all instances.
To activate this capability, a service broker must implement the following:
1. In the [catalog](https://github.com/openservicebrokerapi/servicebroker/blob/v2.13/spec.md#catalog-management) endpoint, the broker must include `requires: syslog_drain`. This minor security measure validates that a service returning a `syslog_drain_url` in response to the [bind](https://github.com/openservicebrokerapi/servicebroker/blob/v2.13/spec.md#binding) 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`,
<%= vars.app_runtime_abbr %> returns an error for the bind operation.
2. In response to a [bind](https://github.com/openservicebrokerapi/servicebroker/blob/v2.13/spec.md#binding) request, the broker returns 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:
`"syslog_drain_url": "syslog://logs.example.com:1234"`
## How does it work?
1. Service broker returns a value for `syslog_drain_url` in response to bind.
1. Loggregator periodically polls an internal Cloud Controller endpoint for updates.
1. Upon discovering a new `syslog_drain_url`, Loggregator identifies the associated app.
1. Loggregator streams app logs for that app to the locations specified by the service instances' `syslog_drain_url`s.
You can manually configure app logs to be streamed to a location of your choice
using user-provided service instances.
For details, see
<% if vars.guide_name == 'Tile Developer' %>
[Streaming app logs to log management services](https://docs.vmware.com/en/VMware-Tanzu-Application-Service/<%= vars.current_major_tas_version %>/tas-for-vms/services-log-management.html).
<% else %>
[Streaming app logs to log management services](../devguide/services/log-management.html).
<% end %>