You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -156,6 +156,15 @@ Logspout relies on the Docker API to retrieve container logs. A failure in the A
156
156
*`SYSLOG_TAG` - datum for tag field (default `{{.ContainerName}}+route.Options["append_tag"]`)
157
157
*`SYSLOG_TIMESTAMP` - datum for timestamp field (default `{{.Timestamp}}`)
158
158
159
+
##### Built-in Template Functions
160
+
161
+
There are a few built in functions as well:
162
+
163
+
*`join $string[] $sep` - Join concatenates the elements of a to create a single string. The separator string sep is placed between elements in the resulting string. Alias for [`strings.Join`][go.string.Join]. `{{ join . "-"}}`
164
+
*`replace $string $old $new $count` - Replaces all occurrences of a string within another string. Alias for [`strings.Replace`][go.string.Replace]. `{{ replace .Container.Config.Hostname "-" "_" -1 }}`
165
+
*`split $string $sep` - Splits a string into an array using a separator string. Alias for [`strings.Split`][go.string.Split]. `{{ split .Container.Config.Hostname "." }}`
166
+
167
+
159
168
#### Raw Format
160
169
161
170
The raw adapter has a function `toJSON` that can be used to format the message/fields to generate JSON-like output in a simple way, or full JSON output.
@@ -233,7 +242,7 @@ docker stack deploy --compose-file <name of your compose file>
233
242
```
234
243
235
244
More information about services and their mode of deployment can be found here:
0 commit comments