GT5-Unofficial/src/main/java/gregtech/api/util/GT_Log.java

38 lines
1.1 KiB
Java
Raw Normal View History

2015-04-23 16:14:22 +00:00
package gregtech.api.util;
import java.io.File;
import java.io.OutputStream;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
/**
* NEVER INCLUDE THIS FILE IN YOUR MOD!!!
2015-10-22 02:15:09 +00:00
* <p/>
2015-04-23 16:14:22 +00:00
* Just a simple Logging Function. If on Server, then this will point to System.out and System.err
*/
public class GT_Log {
2015-10-22 02:15:09 +00:00
public static PrintStream out = System.out;
public static PrintStream err = System.err;
public static PrintStream ore = new LogBuffer();
public static PrintStream pal = null;
2015-04-23 16:14:22 +00:00
public static File mLogFile;
public static File mOreDictLogFile;
public static File mPlayerActivityLogFile;
2015-10-22 02:15:09 +00:00
2015-04-23 16:14:22 +00:00
public static class LogBuffer extends PrintStream {
public final List<String> mBufferedOreDictLog = new ArrayList<String>();
2015-10-22 02:15:09 +00:00
public LogBuffer() {
super(new OutputStream() {
@Override
public void write(int arg0) {/*Do nothing*/}
});
}
@Override
public void println(String aString) {
mBufferedOreDictLog.add(aString);
}
2015-04-23 16:14:22 +00:00
}
}