formula-manager/src/com/zakscode/FormulaManager/Logger.java
2019-01-28 22:10:29 -05:00

33 lines
812 B
Java

/*
* Decompiled with CFR 0_123.
*/
package com.zakscode.FormulaManager;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
class Logger {
Logger() {
}
public static void write(Exception e) {
if (!Boolean.parseBoolean(Main.conf.getProperty("debug"))) {
File file = new File(Main.baseDir + "log.txt");
try {
FileOutputStream fos = new FileOutputStream(file, true);
PrintStream ps = new PrintStream(fos);
e.printStackTrace(ps);
ps.append('\n');
ps.flush();
ps.close();
}
catch (FileNotFoundException fos) {}
} else {
e.printStackTrace();
}
}
}