Skip to content

Commit 60c8fae

Browse files
committed
Added error codes and project name to internal logs.
Updated version;
1 parent 71c3f42 commit 60c8fae

4 files changed

Lines changed: 14 additions & 10 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ Simple logger for java with mixpanel support
66
<dependency>
77
<groupId>io.github.Fi0x</groupId>
88
<artifactId>JavaLogger</artifactId>
9-
<version>1.3.1</version>
9+
<version>1.3.2</version>
1010
</dependency>
1111
```

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.github.Fi0x</groupId>
88
<artifactId>JavaLogger</artifactId>
9-
<version>1.3.1</version>
9+
<version>1.3.2</version>
1010
<name>Java Logger</name>
1111
<description>This is a Library for a custom Java Logger</description>
1212
<url>http://github.com/Fi0x/JavaLogger</url>

src/main/java/io/fi0x/javalogger/logging/Logger.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,9 @@ private void addEntryToLogFile(LogEntry log, String logOutput)
428428
.COLOR(LogColor.RED_BRIGHT)
429429
.LEVEL("ERR")
430430
.EXCEPTION(e)
431-
.CODE(0)
432-
.FILE_ENTRY(false);
431+
.CODE(600)
432+
.FILE_ENTRY(false)
433+
.PROJECTNAME("JavaLogger");
433434
Logger.log(l);
434435
}
435436
}

src/main/java/io/fi0x/javalogger/mixpanel/MixpanelHandler.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ public static boolean addMessage(String eventName, Map<String, String> propertie
6161
LogEntry l = new LogEntry("Could not add Mixpanel-event to queue. Name, UserID or ProjectToken is null")
6262
.COLOR(LogColor.RED_BRIGHT)
6363
.LEVEL("ERR")
64-
.CODE(0)
65-
.FILE_ENTRY(false);
64+
.CODE(601)
65+
.FILE_ENTRY(false)
66+
.PROJECTNAME("JavaLogger");
6667
Logger.log(l);
6768
return false;
6869
}
@@ -77,8 +78,9 @@ public static boolean addMessage(String eventName, Map<String, String> propertie
7778
LogEntry l = new LogEntry("Could not add Mixpanel-event to queue. Property '" + prop + "' is a property mixpanel uses itself")
7879
.COLOR(LogColor.RED_BRIGHT)
7980
.LEVEL("ERR")
80-
.CODE(0)
81-
.FILE_ENTRY(false);
81+
.CODE(602)
82+
.FILE_ENTRY(false)
83+
.PROJECTNAME("JavaLogger");
8284
Logger.log(l);
8385
return false;
8486
}
@@ -184,9 +186,10 @@ private static void startUploaderThread()
184186
LogEntry l = new LogEntry("Could not upload a Mixpanel delivery")
185187
.COLOR(LogColor.RED_BRIGHT)
186188
.LEVEL("ERR")
187-
.CODE(0)
189+
.CODE(603)
188190
.EXCEPTION(e)
189-
.FILE_ENTRY(false);
191+
.FILE_ENTRY(false)
192+
.PROJECTNAME("JavaLogger");
190193
Logger.log(l);
191194
}
192195

0 commit comments

Comments
 (0)