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:06:25 +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:06:25 +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:06:25 +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:06:25 +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
|
|
|
}
|
|
|
|
}
|