commit | b43b3595061ce3138889ac78ded0eebbb144e4db | [log] [tgz] |
---|---|---|
author | Dean Troyer <dtroyer@gmail.com> | Thu Jan 29 12:05:43 2015 -0600 |
committer | Dean Troyer <dtroyer@gmail.com> | Thu Jan 29 12:05:47 2015 -0600 |
tree | eb2a39107f49077a25e0405d3a346f4174425861 | |
parent | e605b39400b7cf9b3114249a88773bb6433f3756 [diff] [blame] |
Create LOGDIR if it doesn't exist Create LOGDIR when LOGFILE is not set. This fix is rather blunt as logging setup will be further tweaked as https://github.com/openstack/qa-specs/blob/master/specs/devstack/devstack-logging-and-service-names.rst progresses. Change-Id: I4a574f295eb6d55c7196ec563bd356d6c0bc8833
diff --git a/stack.sh b/stack.sh index 5b56972..d3d54cc 100755 --- a/stack.sh +++ b/stack.sh
@@ -352,6 +352,10 @@ LOGDAYS=${LOGDAYS:-7} CURRENT_LOG_TIME=$(date "+$TIMESTAMP_FORMAT") +if [[ -n ${LOGDIR:-} ]]; then + mkdir -p $LOGDIR +fi + if [[ -n "$LOGFILE" ]]; then # Clean up old log files. Append '.*' to the user-specified # ``LOGFILE`` to match the date in the search template.