Skip to content

Commit

Permalink
Merge pull request #726 from zowe/v3.x/logging
Browse files Browse the repository at this point in the history
Do not log into `zowe.runtimeDirectory`
  • Loading branch information
JoeNemo authored Aug 28, 2024
2 parents a972451 + b55b510 commit 144625d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
21 changes: 14 additions & 7 deletions bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,27 @@ 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" ]
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
Expand Down

0 comments on commit 144625d

Please sign in to comment.