Skip to content

Commit 5b9eefb

Browse files
committed
Fixed log file name/location.
1 parent 811944b commit 5b9eefb

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,3 @@ bower_components
8787
#Generated files should be ignored as the are regenerated as a build step
8888
*/src/generated
8989
/bin/
90-
91-
#Logging output file
92-
/ui/GRIP.log

core/src/main/java/edu/wpi/grip/core/Main.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ public static void main(String[] args) throws Exception {
2525
Handler fileHandler = null;//This will be our handler for the global logger
2626

2727
try {
28-
fileHandler = new FileHandler("./GRIP.log");//Log to the file "GRIPlogger.log"
28+
String filename = System.getProperty("user.home")+System.getProperty("file.separator")+"GRIP"+System.getProperty("file.separator")+"GRIP.log";
29+
fileHandler = new FileHandler(filename);//Log to the file "GRIPlogger.log"
2930

3031
globalLogger.addHandler(fileHandler);//Add the handler to the global logger
3132

ui/src/main/java/edu/wpi/grip/ui/Main.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public void start(Stage stage) {
3535
Handler fileHandler = null;//This will be our handler for the global logger
3636

3737
try {
38-
fileHandler = new FileHandler("./GRIP.log");//Log to the file "GRIPlogger.log"
38+
String filename = System.getProperty("user.home")+System.getProperty("file.separator")+"GRIP"+System.getProperty("file.separator")+"GRIP.log";
39+
fileHandler = new FileHandler(filename);//Log to the file "GRIPlogger.log"
3940

4041
globalLogger.addHandler(fileHandler);//Add the handler to the global logger
4142

0 commit comments

Comments
 (0)