summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2016-11-28 16:35:35 -0800
committerRoss Brattain <ross.b.brattain@intel.com>2016-11-29 22:56:01 -0800
commitf672caf7c6ec32d26a215ad0cba179a7144a9a08 (patch)
tree05a15779762851419b89086eff975fdeb8ceeaf6 /api
parented89d5d7372b598a3b849f7753e8d29a39282d53 (diff)
centralize logging into root logger
If we setup root logger correctly and have each module logger propogate we shouldn't need individual logger configuration updates: lower paramiko to WARN level dispatcher/file.py was missing logging.handlers import purge all existing handlers and add our own handlers move everything back into yardstick/__init__.py so API can use it make _LOG_STREAM_HDLR global, so we can set loglevel on it whenever added api/server.py call to _init_logging removed old LOG_FORMATTER from cli.py only setLevel on yardstick logger Change-Id: If000799590379d3407655a7d54378481a96ea3d4 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'api')
-rw-r--r--api/server.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/api/server.py b/api/server.py
index 1cbe1725d..3f104c61a 100644
--- a/api/server.py
+++ b/api/server.py
@@ -12,6 +12,7 @@ from flask import Flask
from flask_restful import Api
from api.urls import urlpatterns
+from yardstick import _init_logging
logger = logging.getLogger(__name__)
@@ -23,5 +24,7 @@ reduce(lambda a, b: a.add_resource(b.resource, b.url,
endpoint=b.endpoint) or a, urlpatterns, api)
if __name__ == '__main__':
+ _init_logging()
+ logger.setLevel(logging.DEBUG)
logger.info('Starting server')
app.run(host='0.0.0.0')