diff options
author | Ross Brattain <ross.b.brattain@intel.com> | 2016-11-28 16:35:35 -0800 |
---|---|---|
committer | Ross Brattain <ross.b.brattain@intel.com> | 2016-11-29 22:56:01 -0800 |
commit | f672caf7c6ec32d26a215ad0cba179a7144a9a08 (patch) | |
tree | 05a15779762851419b89086eff975fdeb8ceeaf6 /yardstick/cmd | |
parent | ed89d5d7372b598a3b849f7753e8d29a39282d53 (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 'yardstick/cmd')
-rw-r--r-- | yardstick/cmd/cli.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/yardstick/cmd/cli.py b/yardstick/cmd/cli.py index d141731e1..cac3dc5bf 100644 --- a/yardstick/cmd/cli.py +++ b/yardstick/cmd/cli.py @@ -19,6 +19,7 @@ from pkg_resources import get_distribution from argparse import RawDescriptionHelpFormatter from oslo_config import cfg +from yardstick import _init_logging, LOG from yardstick.cmd.commands import task from yardstick.cmd.commands import runner from yardstick.cmd.commands import scenario @@ -129,15 +130,12 @@ class YardstickCLI(): def _handle_global_opts(self): - # handle global opts - logger = logging.getLogger('yardstick') - logger.setLevel(logging.WARNING) - + _init_logging() if CONF.verbose: - logger.setLevel(logging.INFO) + LOG.setLevel(logging.INFO) if CONF.debug: - logger.setLevel(logging.DEBUG) + LOG.setLevel(logging.DEBUG) def _dispath_func_notask(self): |