diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-12-01 12:28:20 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-12-01 12:29:22 -0600 |
commit | d48bcbe64203a95dbb55d6786ceb3549c5699cdc (patch) | |
tree | be68b0ae9f68d5d2a97b7b1718c99623bd7157e8 /src | |
parent | c098854591a90a2c8d384663a00cb7cb73cef0ac (diff) | |
download | craftbukkit-d48bcbe64203a95dbb55d6786ceb3549c5699cdc.tar craftbukkit-d48bcbe64203a95dbb55d6786ceb3549c5699cdc.tar.gz craftbukkit-d48bcbe64203a95dbb55d6786ceb3549c5699cdc.tar.lz craftbukkit-d48bcbe64203a95dbb55d6786ceb3549c5699cdc.tar.xz craftbukkit-d48bcbe64203a95dbb55d6786ceb3549c5699cdc.zip |
Handle JUL logger formatting
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java b/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java index 124c8ce5..4db463af 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java +++ b/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java @@ -5,11 +5,11 @@ import org.apache.logging.log4j.Logger; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import java.util.logging.Handler; +import java.util.logging.ConsoleHandler; import java.util.logging.Level; import java.util.logging.LogRecord; -public class ForwardLogHandler extends Handler { +public class ForwardLogHandler extends ConsoleHandler { private Map<String, Logger> cachedLoggers = new ConcurrentHashMap<String, Logger>(); private Logger getLogger(String name) { @@ -25,9 +25,9 @@ public class ForwardLogHandler extends Handler { @Override public void publish(LogRecord record) { Logger logger = getLogger(record.getLoggerName()); - String message = record.getMessage(); Throwable exception = record.getThrown(); Level level = record.getLevel(); + String message = getFormatter().formatMessage(record); if (level == Level.SEVERE) { logger.error(message, exception); |