summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-07-30 11:29:13 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2010-07-30 11:29:13 -0700
commit912a6bd28adb2a17c4d0508ee44b1d19ae2624f0 (patch)
tree660e5679a148623d8896647e9562d4aa6fcd06f6 /nova
parent10d79c8ffef8e0c5f42b0dde490acbafa3c1776d (diff)
Make nodaemon twistd processes log to stdout
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'):