You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by go...@apache.org on 2021/06/11 17:37:55 UTC

[incubator-streampipes] branch edge-extensions updated: Fixed Problem in Logger

This is an automated email from the ASF dual-hosted git repository.

gomm pushed a commit to branch edge-extensions
in repository https://gitbox.apache.org/repos/asf/incubator-streampipes.git


The following commit(s) were added to refs/heads/edge-extensions by this push:
     new c216ccd  Fixed Problem in Logger
c216ccd is described below

commit c216ccd2c6a1602decede44d701fe5e4b12dcc6c
Author: daniel-gomm <da...@outlook.de>
AuthorDate: Fri Jun 11 19:37:41 2021 +0200

    Fixed Problem in Logger
---
 .../apache/streampipes/logging/evaluation/EvaluationLogger.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/streampipes-logging/src/main/java/org/apache/streampipes/logging/evaluation/EvaluationLogger.java b/streampipes-logging/src/main/java/org/apache/streampipes/logging/evaluation/EvaluationLogger.java
index 69825f7..dc567af 100644
--- a/streampipes-logging/src/main/java/org/apache/streampipes/logging/evaluation/EvaluationLogger.java
+++ b/streampipes-logging/src/main/java/org/apache/streampipes/logging/evaluation/EvaluationLogger.java
@@ -17,6 +17,7 @@
  */
 package org.apache.streampipes.logging.evaluation;
 
+import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
@@ -65,9 +66,9 @@ public class EvaluationLogger {
     }
 
     public void writeOut(){
-        try (FileWriter fw = new FileWriter(file)){
-            fw.append(buffer);
-            fw.flush();
+        try (BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file, true))){
+            bufferedWriter.append(buffer);
+            bufferedWriter.flush();
             buffer = "";
         } catch (IOException e) {
             e.printStackTrace();