Skip to content

Commit

Permalink
Merge pull request #14 from mricharz/patch-1
Browse files Browse the repository at this point in the history
Disabled creation of Logfile if debugToFile is false
  • Loading branch information
TheHolyWaffle committed Jun 16, 2014
2 parents 666d3d8 + 9bf42f6 commit 635ad33
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@ public class LogHandler extends Handler {

public LogHandler(boolean debugToFile) {
this.debugToFile = debugToFile;
log = new File("teamspeak.log");
if (!log.exists()) {
try {
log.createNewFile();
} catch (IOException e) {
e.printStackTrace();
if(this.debugToFile) {
log = new File("teamspeak.log");
if (!log.exists()) {
try {
log.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
Expand Down

0 comments on commit 635ad33

Please sign in to comment.