Fixed logging

This commit is contained in:
h31ix committed 2012-09-25 18:17:41 -04:00
1 parent 98cf43a0fc
commit 4ef2534114
6 files changed
+13 -55

No files matched your search

@@ -26,21 +26,13 @@ import java.util.logging.LogRecord;
public class FileFormatter extends Formatter
{
private static final DateFormat format = new SimpleDateFormat("h:mm:ss");
private static final String lineSep = System.getProperty("line.separator");
@Override
public String format(LogRecord record)
{
if (record.getMessage().startsWith("[AntiCheat]"))
{
StringBuilder output = new StringBuilder().append("[").append(record.getLevel()).append('|').append(format.format(new Date(record.getMillis()))).append("]: ").append(record.getMessage()).append(' ').append(lineSep);
return output.toString();
}
else
{
return "";
}
StringBuilder output = new StringBuilder().append("[").append(record.getLevel()).append('|').append(format.format(new Date(record.getMillis()))).append("]: ").append(record.getMessage()).append(' ').append(lineSep);
return output.toString();
}
}