NFVBENCH-35 Runlogdate is 0 in resultnfvbench
[nfvbench.git] / nfvbench / nfvbench.py
index 4256f24..84f9838 100644 (file)
@@ -129,10 +129,13 @@ class NFVBench(object):
 
     def prepare_summary(self, result):
         """Prepares summary of the result to print and send it to logger (eg: fluentd)"""
-        sender = FluentLogHandler("resultnfvbench",
-                                  fluentd_ip=self.config.fluentd.ip,
-                                  fluentd_port=self.config.fluentd.port) \
-            if self.config.fluentd.logging_tag else None
+        global fluent_logger
+        sender = None
+        if fluent_logger:
+            sender = FluentLogHandler("resultnfvbench",
+                                      fluentd_ip=self.config.fluentd.ip,
+                                      fluentd_port=self.config.fluentd.port)
+            sender.runlogdate = fluent_logger.runlogdate
         summary = NFVBenchSummarizer(result, sender)
         LOG.info(str(summary))