From 7129e82038dcd5b6dac84b6719dfcf77798bda20 Mon Sep 17 00:00:00 2001 From: CyB3RC0nN0R Date: Sun, 16 Feb 2020 21:53:10 +0100 Subject: [PATCH] Appended timestamp to log file names --- src/main/java/envoy/client/util/EnvoyLog.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/envoy/client/util/EnvoyLog.java b/src/main/java/envoy/client/util/EnvoyLog.java index ae6c6e5..a6391c6 100644 --- a/src/main/java/envoy/client/util/EnvoyLog.java +++ b/src/main/java/envoy/client/util/EnvoyLog.java @@ -2,6 +2,8 @@ package envoy.client.util; import java.io.File; import java.io.IOException; +import java.text.SimpleDateFormat; +import java.util.Date; import java.util.logging.*; import envoy.client.data.Config; @@ -25,7 +27,8 @@ public class EnvoyLog { LogManager.getLogManager().reset(); // Configure log file - File logFile = new File(Config.getInstance().getHomeDirectory(), "log/envoy_user.log"); + File logFile = new File(Config.getInstance().getHomeDirectory(), + "log/envoy_user_" + new SimpleDateFormat("yyyy-MM-dd--hh-mm-mm").format(new Date()) + ".log"); logFile.getParentFile().mkdirs(); // Configure formatting