Skip to content

Commit a231ff5

Browse files
authored
Merge pull request #608 from chombium/log-type-filter-improvements
Log type filter improvements
2 parents 3060ba8 + f537532 commit a231ff5

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

services/log-management.html.md.erb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +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).
101+
If you are not interested in some log types or they cause overloading in your backend, you can specify which log types are forwarded with your syslog drain using the `include-log-types` or `exclude-log-types` Syslog URL query parameters. The `include-log-types` parameter forwards only logs from the specified log types, while `exclude-log-types` forwards all logs except those from the specified log types. Both parameters accept a comma-separated list of log types, and you can only use one parameter at a time. For a list of valid log types, see [App logging in Cloud Foundry](../deploy-apps/streaming-logs.html).
102+
103+
When using `include-log-types`, logs with a missing or unrecognized log type are dropped. When using `exclude-log-types`, logs with a missing or unrecognized log type are forwarded.
102104

103105
Example: Forward only application and router logs:
104106
<pre class="terminal">
105-
$ cf create-user-provided-service my_app_drain -l syslog://logs.example.com:1234?include-source-types=app,rtr
107+
$ cf create-user-provided-service my_app_drain -l syslog://logs.example.com:1234?include-log-types=app,rtr
106108
</pre>
107109

108110
Example: Forward all logs except staging logs:
109111
<pre class="terminal">
110-
$ cf create-user-provided-service my_app_drain -l syslog://logs.example.com:1234?exclude-source-types=stg
112+
$ cf create-user-provided-service my_app_drain -l syslog://logs.example.com:1234?exclude-log-types=stg
111113
</pre>
112114

113115
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>

0 commit comments

Comments
 (0)