Appended timestamp to log file names
This commit is contained in:
parent
cd590448cc
commit
7129e82038
@ -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
|
||||
|
Reference in New Issue
Block a user