summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-02-26 11:29:37 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-02-26 11:29:37 +0000
commit07b86b12306f0cb6c6002862665e8a601636d72e (patch)
treee03d6785345657d0863b50e000d90b12ec42e543 /src/main/java/net/minecraft
parentbb8d9fbe9d34e6bf26e84b1f96dfa5a3c0a1eb3c (diff)
downloadcraftbukkit-07b86b12306f0cb6c6002862665e8a601636d72e.tar
craftbukkit-07b86b12306f0cb6c6002862665e8a601636d72e.tar.gz
craftbukkit-07b86b12306f0cb6c6002862665e8a601636d72e.tar.lz
craftbukkit-07b86b12306f0cb6c6002862665e8a601636d72e.tar.xz
craftbukkit-07b86b12306f0cb6c6002862665e8a601636d72e.zip
Added command line option 'date-format' to control how dates are printed to console (not to log)
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r--src/main/java/net/minecraft/server/ConsoleLogManager.java7
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/ConsoleLogManager.java b/src/main/java/net/minecraft/server/ConsoleLogManager.java
index 641c8ca7..53308077 100644
--- a/src/main/java/net/minecraft/server/ConsoleLogManager.java
+++ b/src/main/java/net/minecraft/server/ConsoleLogManager.java
@@ -1,5 +1,6 @@
package net.minecraft.server;
+import java.text.SimpleDateFormat;
import java.util.logging.ConsoleHandler;
import java.util.logging.FileHandler;
import java.util.logging.Level;
@@ -18,11 +19,11 @@ public class ConsoleLogManager {
public ConsoleLogManager() {}
// Craftbukkit - change of method signature!
- public static void a(ConsoleReader reader) {
+ public static void a(MinecraftServer server) {
ConsoleLogFormatter consolelogformatter = new ConsoleLogFormatter();
a.setUseParentHandlers(false);
- ConsoleHandler consolehandler = new TerminalConsoleHandler(reader);
+ ConsoleHandler consolehandler = new TerminalConsoleHandler(server.reader); // Craftbukkit
// CraftBukkit start
for (Handler handler: global.getHandlers()) {
@@ -30,7 +31,7 @@ public class ConsoleLogManager {
}
// CraftBukkit end
- consolehandler.setFormatter(new ShortConsoleLogFormatter()); // Craftbukkit
+ consolehandler.setFormatter(new ShortConsoleLogFormatter(server)); // Craftbukkit
a.addHandler(consolehandler);
global.addHandler(consolehandler); // CraftBukkit
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index b9e6ff0b..8127ac03 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -75,7 +75,7 @@ public class MinecraftServer implements Runnable, ICommandListener {
threadcommandreader.setDaemon(true);
threadcommandreader.start();
- ConsoleLogManager.a(reader); // Craftbukkit
+ ConsoleLogManager.a(this); // Craftbukkit
// CraftBukkit start
System.setOut(new PrintStream(new LoggerOutputStream(a, Level.INFO), true));