diff --git a/CHANGELOG.md b/CHANGELOG.md index cc13c2f5..92650925 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ All notable changes to the ZSS package will be documented in this file. ## `3.0.0` - +- Enhancement: if no `zowe.logDirectory` is defined in config, logging is disabled. (#726) ## `2.18.0` - Change log level for setting default value of 'httpRequestHeapMaxBlocks' to DEBUG instead of INFO.(#719) diff --git a/bin/start.sh b/bin/start.sh index 0f7e1238..6f4a6e5c 100755 --- a/bin/start.sh +++ b/bin/start.sh @@ -74,7 +74,13 @@ if [[ "${OSNAME}" == "OS/390" ]]; then then ZWES_LOG_DIR=${ZWE_zowe_logDirectory} else - ZWES_LOG_DIR="../log" + if [ -z "${ZWE_zowe_runtimeDirectory}" ]; then + ZWES_LOG_DIR="../log" + else + echo "No log directory. Logging disabled." + ZWES_LOG_DIR= + ZWES_LOG_FILE=/dev/null + fi fi fi if [ -f "$ZWES_LOG_DIR" ] @@ -82,12 +88,13 @@ if [[ "${OSNAME}" == "OS/390" ]]; then ZWES_LOG_FILE=$ZWES_LOG_DIR elif [ ! -d "$ZWES_LOG_DIR" ] then - echo "Will make log directory $ZWES_LOG_DIR" - mkdir -p $ZWES_LOG_DIR - if [ $? -ne 0 ] - then - echo "Cannot make log directory. Logging disabled." - ZWES_LOG_FILE=/dev/null + if [ -n "${ZWES_LOG_DIR}" ]; then + echo "Will make log directory $ZWES_LOG_DIR" + mkdir -p $ZWES_LOG_DIR + if [ $? -ne 0 ]; then + echo "Cannot make log directory. Logging disabled." + ZWES_LOG_FILE=/dev/null + fi fi fi ZWES_ROTATE_LOGS=0