summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-07-30 19:03:15 +0000
committerTarmac <>2010-07-30 19:03:15 +0000
commit1db9c94a78bcbefaaa59ee5ee0de4efe5fc1c790 (patch)
tree660e5679a148623d8896647e9562d4aa6fcd06f6
parent10d79c8ffef8e0c5f42b0dde490acbafa3c1776d (diff)
parent912a6bd28adb2a17c4d0508ee44b1d19ae2624f0 (diff)
downloadnova-1db9c94a78bcbefaaa59ee5ee0de4efe5fc1c790.tar.gz
nova-1db9c94a78bcbefaaa59ee5ee0de4efe5fc1c790.tar.xz
nova-1db9c94a78bcbefaaa59ee5ee0de4efe5fc1c790.zip
Make nodaemon twistd processes log to stdout.
-rwxr-xr-xbin/nova-objectstore5
-rw-r--r--nova/twistd.py3
2 files changed, 3 insertions, 5 deletions
diff --git a/bin/nova-objectstore b/bin/nova-objectstore
index 9385fd299..c0fa815c0 100755
--- a/bin/nova-objectstore
+++ b/bin/nova-objectstore
@@ -21,8 +21,6 @@
Twisted daemon for nova objectstore. Supports S3 API.
"""
-import logging
-
from nova import flags
from nova import utils
from nova import twistd
@@ -33,9 +31,6 @@ FLAGS = flags.FLAGS
def main():
- # FIXME: if this log statement isn't here, no logging
- # appears from other files and app won't start daemonized
- logging.debug('Started HTTP server on %s' % (FLAGS.s3_port))
app = handler.get_application()
print app
return app
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'):