Skip to content

Commit ac5a52c

Browse files
committed
Logging will now create an entry in a file, regardeless of weather the log is debug or verbose mode
1 parent 1257a7f commit ac5a52c

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

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.1.10</version>
9+
<version>1.1.11</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: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,24 @@ public void setConsoleExceptions(boolean showExceptionsInConsole)
116116
*/
117117
public static void log(LogEntry log)
118118
{
119+
String logOutput = createLogString(log);
120+
119121
if((log.onlyDebug && getInstance().isDebug) || (log.onlyVerbose && getInstance().isVerbose) || (!log.onlyVerbose && !log.onlyDebug))
120122
{
121-
String logOutput = createLogString(log);
122123
System.out.println(log.color + log.background + logOutput + LogColor.RESET);
123124

124125
if(log.exception != null)
125126
{
126127
if(getInstance().consoleExceptions || log.consoleException)
127128
log.exception.printStackTrace();
128129
}
130+
}
129131

130-
if(log.fileEntry)
131-
getInstance().addEntryToLogFile(log, logOutput);
132+
if(log.fileEntry)
133+
getInstance().addEntryToLogFile(log, logOutput);
132134

133-
if(log.mixpanel)
134-
sendMixpanelMessage(log);
135-
}
135+
if(log.mixpanel)
136+
sendMixpanelMessage(log);
136137
}
137138
/**
138139
* Create a {@link LogEntry} with the specified text and {@link LogTemplate}.

0 commit comments

Comments
 (0)