From 89bc4d482a1c92f7217d1d284829f456620364be Mon Sep 17 00:00:00 2001 From: rusefillc Date: Sun, 3 Oct 2021 18:25:04 -0400 Subject: [PATCH] rusefi_Console file logging: text messages? fix #3304 --- .../logging/src/main/java/com/rusefi/FileLog.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/java_console/logging/src/main/java/com/rusefi/FileLog.java b/java_console/logging/src/main/java/com/rusefi/FileLog.java index 8f1075dbe4..bd0bcac7cf 100644 --- a/java_console/logging/src/main/java/com/rusefi/FileLog.java +++ b/java_console/logging/src/main/java/com/rusefi/FileLog.java @@ -1,5 +1,6 @@ package com.rusefi; +import com.devexperts.logging.Logging; import com.opensr5.Logger; import com.rusefi.util.LazyFile; import org.jetbrains.annotations.Nullable; @@ -88,10 +89,12 @@ public enum FileLog { private FileOutputStream openLog() throws FileNotFoundException { String date = Logger.getDate(); createFolderIfNeeded(); - currentLogName = name() + "_rfi_report_" + date + ".csv"; - String fileName = Logger.DIR + currentLogName; - rlog("Writing to " + fileName); - return new FileOutputStream(fileName, true); + String shortFileName = name() + "_rfi_report_" + date; + Logging.configureLogFile(Logger.DIR + shortFileName + ".log"); + currentLogName = shortFileName + ".csv"; + String fullFileName = Logger.DIR + currentLogName; + rlog("Writing to " + fullFileName); + return new FileOutputStream(fullFileName, true); } public static void createFolderIfNeeded() {