From a14da7aaa84685ce80cb13871ef7fc7e889a4db6 Mon Sep 17 00:00:00 2001 From: Arthur Barr Date: Tue, 6 Mar 2018 13:47:52 +0000 Subject: [PATCH] Change LOG_FORMAT to basic --- Dockerfile-server | 2 +- README.md | 2 +- cmd/runmqserver/logging.go | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile-server b/Dockerfile-server index 93abc65..d168304 100644 --- a/Dockerfile-server +++ b/Dockerfile-server @@ -65,6 +65,6 @@ RUN chmod ug+x /usr/local/bin/runmqserver \ # Always use port 1414 EXPOSE 1414 -ENV LANG=en_US.UTF-8 AMQ_DIAGNOSTIC_MSG_SEVERITY=1 AMQ_ADDITIONAL_JSON_LOG=1 LOG_FORMAT=simple +ENV LANG=en_US.UTF-8 AMQ_DIAGNOSTIC_MSG_SEVERITY=1 AMQ_ADDITIONAL_JSON_LOG=1 LOG_FORMAT=basic ENTRYPOINT ["runmqserver"] diff --git a/README.md b/README.md index aeb8b43..037b5e4 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ In order to use the image, it is necessary to accept the terms of the IBM MQ lic * **LICENSE** - Set this to `accept` to agree to the MQ Advanced for Developers license. If you wish to see the license you can set this to `view`. * **LANG** - Set this to the language you would like the license to be printed in. * **MQ_QMGR_NAME** - Set this to the name you want your Queue Manager to be created with. -* **LOG_FORMAT** - Set this to change the format of the logs which are printed on the container's stdout. Set to "json" to use JSON format (JSON object per line); set to "simple" to use a simple human-readable. Defaults to "simple". +* **LOG_FORMAT** - Set this to change the format of the logs which are printed on the container's stdout. Set to "json" to use JSON format (JSON object per line); set to "basic" to use a simple human-readable. Defaults to "basic". # Issues and contributions diff --git a/cmd/runmqserver/logging.go b/cmd/runmqserver/logging.go index 6814124..a50b1e7 100644 --- a/cmd/runmqserver/logging.go +++ b/cmd/runmqserver/logging.go @@ -94,10 +94,10 @@ func configureLogger() (mirrorFunc, error) { d := getDebug() switch f { case "json": - log = logger.NewLogger(os.Stdout, d, true) + log = logger.NewLogger(os.Stderr, d, true) return log.LogDirect, nil - case "simple": - log = logger.NewLogger(os.Stdout, d, false) + case "basic": + log = logger.NewLogger(os.Stderr, d, false) return func(msg string) { // Parse the JSON message, and print a simplified version var obj map[string]interface{}