aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKerim Gokarslan <kgokarsl@cisco.com>2018-03-19 15:50:25 -0700
committerKerim Gokarslan <kgokarsl@cisco.com>2018-03-19 15:51:15 -0700
commit8c22b06e2c041bc17d927c67532fb69d2bd7d7b6 (patch)
treee1b0de425fcc80969cd91dcc8652229304568a03
parent8450089d5aa09e1c4de4b5701f5210b8f8f7dfdc (diff)
NFVBENCH-75 fluent logger configure not override by -c my_config.yaml
Change-Id: I139037069d930ca5c15078c455933f3e5eebe484 Signed-off-by: Kerim Gokarslan <kgokarsl@cisco.com>
-rw-r--r--nfvbench/nfvbench.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py
index f17b51c..bf6e5d0 100644
--- a/nfvbench/nfvbench.py
+++ b/nfvbench/nfvbench.py
@@ -467,14 +467,6 @@ def main():
opts, unknown_opts = parse_opts_from_cli()
log.set_level(debug=opts.debug)
- # setup the fluent logger as soon as possible right after the config plugin is called,
- # if there is any logging or result tag is set then initialize the fluent logger
- for fluentd in config.fluentd:
- if fluentd.logging_tag or fluentd.result_tag:
- fluent_logger = FluentLogHandler(config.fluentd)
- LOG.addHandler(fluent_logger)
- break
-
if opts.version:
print pbr.version.VersionInfo('nfvbench').version_string_with_vcs()
sys.exit(0)
@@ -506,6 +498,14 @@ def main():
LOG.info('Loading configuration string: %s', opts.config)
config = config_loads(opts.config, config, whitelist_keys)
+ # setup the fluent logger as soon as possible right after the config plugin is called,
+ # if there is any logging or result tag is set then initialize the fluent logger
+ for fluentd in config.fluentd:
+ if fluentd.logging_tag or fluentd.result_tag:
+ fluent_logger = FluentLogHandler(config.fluentd)
+ LOG.addHandler(fluent_logger)
+ break
+
# traffic profile override options
override_custom_traffic(config, opts.frame_sizes, opts.unidir)