diff --git a/bin/nova-objectstore b/bin/nova-objectstore index 9385fd299bcd..c0fa815c0570 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 ecb6e2892d28..c83276daab07 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'):