Alpha logging support (JSON+mirroring)

This commit is contained in:
Arthur Barr
2018-01-29 11:04:01 +00:00
parent d1852d9af4
commit ed1154c881
389 changed files with 75978 additions and 6394 deletions

13
docs/alpha.md Normal file
View File

@@ -0,0 +1,13 @@
Alpha/experimental features
===========================
Use of the following environment variables is unsupported, and the features are subject to change without notice:
* **MQ_ALPHA_JSON_LOGS** - Set this to `true` or `1` to log in JSON format to stdout from the container.
* **MQ_ALPHA_MIRROR_ERROR_LOGS** - Set this to `true` or `1` to mirror the MQ error logs to the container's stdout
## Viewing the logs on the command line
The JSON-formatted logs are useful for forwarding to a log analysis system, but not very friendly when using `docker logs` or `kubectl logs`. You can format them using a command line utility like `jq`, for example:
```
docker run -e LICENSE=accept --rm -i -e MQ_QMGR_NAME=qm1 -e MQ_ALPHA_JSON_LOGS=1 mqadvanced-server:9.0.4.0-x86_64-ubuntu-16.04 2>&1 | jq -r '.ibm_datetime + " " + .message'
```