Browse code

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

Dean Troyer authored on 2015/01/30 03:05:43
Showing 1 changed files
... ...
@@ -352,6 +352,10 @@ TIMESTAMP_FORMAT=${TIMESTAMP_FORMAT:-"%F-%H%M%S"}
352 352
 LOGDAYS=${LOGDAYS:-7}
353 353
 CURRENT_LOG_TIME=$(date "+$TIMESTAMP_FORMAT")
354 354
 
355
+if [[ -n ${LOGDIR:-} ]]; then
356
+    mkdir -p $LOGDIR
357
+fi
358
+
355 359
 if [[ -n "$LOGFILE" ]]; then
356 360
     # Clean up old log files.  Append '.*' to the user-specified
357 361
     # ``LOGFILE`` to match the date in the search template.