From 2ba3934ce06b7c2d1c58d3347906c562063a9565 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Thu, 26 Apr 2012 11:02:15 -0700 Subject: [PATCH] Put Starting Heat API in log file and add logging setup to bin/heat-api Signed-off-by: Steven Dake --- bin/heat-api | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/heat-api b/bin/heat-api index 00ad0ffe..a581b4cb 100755 --- a/bin/heat-api +++ b/bin/heat-api @@ -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) -- 2.45.2