Skip to content

Commit d87ef19

Browse files
authored
Merge pull request #576 from jorbaum/add-log-type-filter
Document new log-source-type syslog drain config
2 parents cb10aa0 + dd5a7d2 commit d87ef19

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

services/log-management.html.md.erb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,18 @@ You can create a syslog drain service and bind apps to it using Cloud Foundry Co
9898

9999
It's important to note that the `drain-data` parameter has precedence over `drain-type`parameter. If the `include-metrics-deprecated` parameter is present in the Syslog URL, the drain forwards logs, application container metrics, and traces.
100100

101+
You can filter which log sources are forwarded to your syslog drain using the `include-source-types` or `exclude-source-types` URL query parameters. The `include-source-types` parameter forwards only logs from the specified source types, while `exclude-source-types` forwards all logs except those from the specified source types. Both parameters accept a comma-separated list of source types, and you can only use one parameter at a time. For a list of valid source types, see [App logging in Cloud Foundry](../deploy-apps/streaming-logs.html).
102+
103+
Example: Forward only application and router logs:
104+
<pre class="terminal">
105+
$ cf create-user-provided-service my_app_drain -l syslog://logs.example.com:1234?include-source-types=app,rtr
106+
</pre>
107+
108+
Example: Forward all logs except staging logs:
109+
<pre class="terminal">
110+
$ cf create-user-provided-service my_app_drain -l syslog://logs.example.com:1234?exclude-source-types=stg
111+
</pre>
112+
101113
If you are using the mTLS feature delivered in [CAPI release 1.143.0](https://github.com/cloudfoundry/capi-release/releases/tag/1.143.0), you can use the `-p` flag to define the client certificate and key as credentials, filling in values as follows.</br>
102114

103115
<pre class="terminal">

0 commit comments

Comments
 (0)