summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
Diffstat (limited to 'nova')
-rw-r--r--nova/twistd.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/twistd.py b/nova/twistd.py
index ecb6e2892..c83276daa 100644
--- a/nova/twistd.py
+++ b/nova/twistd.py
@@ -214,6 +214,9 @@ def serve(filename):
FLAGS.pidfile = '%s.pid' % name
elif FLAGS.pidfile.endswith('twistd.pid'):
FLAGS.pidfile = FLAGS.pidfile.replace('twistd.pid', '%s.pid' % name)
+ # NOTE(vish): if we're running nodaemon, redirect the log to stdout
+ if FLAGS.nodaemon and not FLAGS.logfile:
+ FLAGS.logfile = "-"
if not FLAGS.logfile:
FLAGS.logfile = '%s.log' % name
elif FLAGS.logfile.endswith('twistd.log'):