From 9c072060df54cc5c7ca314a54c4a08c7d613f83e Mon Sep 17 00:00:00 2001 From: Arthur Barr Date: Mon, 5 Mar 2018 14:48:43 +0000 Subject: [PATCH 1/3] Remove alpha docs --- docs/alpha.md | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 docs/alpha.md diff --git a/docs/alpha.md b/docs/alpha.md deleted file mode 100644 index a10c9975..00000000 --- a/docs/alpha.md +++ /dev/null @@ -1,13 +0,0 @@ -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' -``` From ab60a8975f9e9b4efb605eee7247c43fcb2ccabb Mon Sep 17 00:00:00 2001 From: Arthur Barr Date: Mon, 5 Mar 2018 14:55:48 +0000 Subject: [PATCH 2/3] Remove logrus (MIT license) from notices file --- NOTICES.txt | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git a/NOTICES.txt b/NOTICES.txt index 6d693e14..5e396a95 100644 --- a/NOTICES.txt +++ b/NOTICES.txt @@ -13,12 +13,7 @@ A. SUMMARY =============================================================================== Section B. below contains provisions relating to certain other components of the Program, as follows:- -B.1 MIT license -Affected Components: -* sirupsen/logrus - Copyright (c) 2014 Simon Eskildsen - -B.2 BSD 3-Clause license +B.1 BSD 3-Clause license Affected Components: * golang.org/x/crypto Copyright (c) 2009 The Go Authors. All rights reserved. @@ -32,30 +27,7 @@ END OF A. SUMMARY B. LICENSE FILES AND OTHER INFORMATION ========================================================================== ========================================================================== -B.1 MIT license -========================================================================== -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -========================================================================== -END OF B.1 MIT license -========================================================================== - -========================================================================== -B.2 BSD 3-Clause license +B.1 BSD 3-Clause license ========================================================================== Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -83,7 +55,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ========================================================================== -END OF B.2 BSD 3-Clause license +END OF B.1 BSD 3-Clause license ========================================================================== ========================================================================== From a14da7aaa84685ce80cb13871ef7fc7e889a4db6 Mon Sep 17 00:00:00 2001 From: Arthur Barr Date: Tue, 6 Mar 2018 13:47:52 +0000 Subject: [PATCH 3/3] 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 93abc65a..d1683043 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 aeb8b430..037b5e46 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 6814124a..a50b1e7d 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{}