]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Put Starting Heat API in log file and add logging setup to bin/heat-api
authorSteven Dake <sdake@redhat.com>
Thu, 26 Apr 2012 18:02:15 +0000 (11:02 -0700)
committerSteven Dake <sdake@redhat.com>
Thu, 26 Apr 2012 18:02:15 +0000 (11:02 -0700)
Signed-off-by: Steven Dake <sdake@redhat.com>
bin/heat-api

index 00ad0ffe6f9e0716abf80f73a6c8891da4d81dac..a581b4cbcf9d6ce71df2c537527a5719f9161a81 100755 (executable)
@@ -33,11 +33,13 @@ if os.path.exists(os.path.join(possible_topdir, 'heat', '__init__.py')):
 
 gettext.install('heat', unicode=1)
 
+import logging
 from heat import rpc
 from heat.common import config
 from heat.common import wsgi
 from paste import httpserver
 
+LOG = logging.getLogger('heat.api')
 
 if __name__ == '__main__':
     try:
@@ -45,11 +47,12 @@ if __name__ == '__main__':
         conf()
         config.FLAGS = conf
         rpc.configure(conf)
+        config.setup_logging(conf)
 
         app = config.load_paste_app(conf)
 
         port = config.DEFAULT_PORT
-        print 'Starting Heat API on port %s' % port
+        LOG.info(('Starting Heat API on port %s') % port)
         httpserver.serve(app, port=port)
     except RuntimeError, e:
         sys.exit("ERROR: %s" % e)