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
Copy file name to clipboardexpand all lines: README.md
+15-3
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,8 @@ logspout will gather logs from other containers that are started **without the `
37
37
38
38
To see what data is used for syslog messages, see the [syslog adapter](http://github.com/gliderlabs/logspout/blob/master/adapters) docs.
39
39
40
+
The container must be able to access the Docker Unix socket to mount it. This is typically a problem when [namespace remapping](https://docs.docker.com/engine/security/userns-remap/) is enabled. To disable remapping for the logspout container, pass the `--userns=host` flag to `docker run`, `.. create`, etc.
41
+
40
42
#### Ignoring specific containers
41
43
42
44
You can tell logspout to ignore specific containers by setting an environment variable when starting your container, like so:-
@@ -192,6 +194,14 @@ If you use multiline logging with raw, it's recommended to json encode the Data
192
194
193
195
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.
194
196
197
+
The RAW_FORMAT env variable is used as a [Go template](https://golang.org/pkg/text/template/) with a [`Message` struct](https://github.com/gliderlabs/logspout/blob/master/router/types.go#L52) passed as data. You can access the following fields
198
+
199
+
*`Source` - source stream name ("stdout", "stderr", ...)
200
+
*`Data` - original log message
201
+
*`Time` - a Go [`Time` struct](https://golang.org/pkg/time/#Time)
202
+
*`Container` - a [go-dockerclient](https://github.com/fsouza/go-dockerclient)`Container` struct (see [container.go](https://github.com/fsouza/go-dockerclient/blob/master/container.go#L443) source file for accessible fields)
203
+
204
+
195
205
Use examples:
196
206
197
207
##### Mixed JSON + generic:
@@ -273,9 +283,9 @@ logspout supports modification of the client TLS settings via environment variab
273
283
| Environment Variable | Description |
274
284
| :--- | :--- |
275
285
|`LOGSPOUT_TLS_DISABLE_SYSTEM_ROOTS`| when set to `true` it disables loading the system trust store into the trust store of logspout |
276
-
|`LOGSPOUT_TLS_CA_CERTS`| a comma seperated list of filesystem paths to pem encoded CA certificates that should be added to logsput's TLS trust store. Each pem file can contain more than one certificate |
277
-
|`LOGSPOUT_TLS_CLIENT_CERT`|filesytem path to pem encoded x509 client certificate to load when TLS mutual authentication is desired |
278
-
|`LOGSPOUT_TLS_CLIENT_KEY`|filesytem path to pem encoded client private key to load when TLS mutual authentication is desired |
286
+
|`LOGSPOUT_TLS_CA_CERTS`| a comma separated list of filesystem paths to pem encoded CA certificates that should be added to logsput's TLS trust store. Each pem file can contain more than one certificate |
287
+
|`LOGSPOUT_TLS_CLIENT_CERT`|filesystem path to pem encoded x509 client certificate to load when TLS mutual authentication is desired |
288
+
|`LOGSPOUT_TLS_CLIENT_KEY`|filesystem path to pem encoded client private key to load when TLS mutual authentication is desired |
279
289
|`LOGSPOUT_TLS_HARDENING`| when set to `true` it enables stricter client TLS settings designed to mitigate some known TLS vulnerabilities |
280
290
281
291
#### Example TLS settings
@@ -329,6 +339,8 @@ The standard distribution of logspout comes with all modules defined in this rep
0 commit comments