summaryrefslogtreecommitdiffstats
path: root/test/test_nfvbench.py
diff options
context:
space:
mode:
authorAlec Hothan <ahothan@cisco.com>2017-10-18 17:10:40 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-10-18 17:10:40 +0000
commit8fca5f93109dfb317b14e6ed41298497504bce39 (patch)
tree1db7e5bd957ce94ca068f6c3681588aaeb545a11 /test/test_nfvbench.py
parentbd2c88b1fe7a0f8c3883c9f60ff2cda88f8c33a1 (diff)
parent12e5c1edecb6c9fc835b0908b2d0fd9e8486fd09 (diff)
Merge "NFVBENCH-42 Add multiple fluentd aggregators support"
Diffstat (limited to 'test/test_nfvbench.py')
-rw-r--r--test/test_nfvbench.py35
1 files changed, 34 insertions, 1 deletions
diff --git a/test/test_nfvbench.py b/test/test_nfvbench.py
index 85342bb..2578407 100644
--- a/test/test_nfvbench.py
+++ b/test/test_nfvbench.py
@@ -786,11 +786,44 @@ def test_config():
def test_fluentd():
logger = logging.getLogger('fluent-logger')
- handler = FluentLogHandler('nfvbench', fluentd_port=7081)
+
+ class FluentdConfig(dict):
+ def __getattr__(self, attr):
+ return self.get(attr)
+
+ fluentd_configs = [
+ FluentdConfig({
+ 'logging_tag': 'nfvbench',
+ 'result_tag': 'resultnfvbench',
+ 'ip': '127.0.0.1',
+ 'port': 7081
+ }),
+ FluentdConfig({
+ 'logging_tag': 'nfvbench',
+ 'result_tag': 'resultnfvbench',
+ 'ip': '127.0.0.1',
+ 'port': 24224
+ }),
+ FluentdConfig({
+ 'logging_tag': None,
+ 'result_tag': 'resultnfvbench',
+ 'ip': '127.0.0.1',
+ 'port': 7082
+ }),
+ FluentdConfig({
+ 'logging_tag': 'nfvbench',
+ 'result_tag': None,
+ 'ip': '127.0.0.1',
+ 'port': 7083
+ })
+ ]
+
+ handler = FluentLogHandler(fluentd_configs=fluentd_configs)
logger.addHandler(handler)
logger.setLevel(logging.INFO)
logger.info('test')
logger.warning('test %d', 100)
+
try:
raise Exception("test")
except Exception: