Use standard format function to format logs. Addresses BUKKIT-2246

Also fix "excess" Log Levels.
This commit is contained in:
EdGruberman 2012-08-11 16:29:50 -07:00 committed by feildmaster
parent 161ab5edc6
commit 450edc3004
2 changed files with 3 additions and 3 deletions

View File

@ -39,11 +39,11 @@ final class ConsoleLogFormatter extends Formatter {
stringbuilder.append(" [WARNING] "); stringbuilder.append(" [WARNING] ");
} else if (level == Level.SEVERE) { } else if (level == Level.SEVERE) {
stringbuilder.append(" [SEVERE] "); stringbuilder.append(" [SEVERE] ");
} else if (level == Level.SEVERE) { } else { // CraftBukkit
stringbuilder.append(" [").append(level.getLocalizedName()).append("] "); stringbuilder.append(" [").append(level.getLocalizedName()).append("] ");
} }
stringbuilder.append(logrecord.getMessage()); stringbuilder.append(formatMessage(logrecord)); // CraftBukkit
stringbuilder.append('\n'); stringbuilder.append('\n');
Throwable throwable = logrecord.getThrown(); Throwable throwable = logrecord.getThrown();

View File

@ -46,7 +46,7 @@ public class ShortConsoleLogFormatter extends Formatter {
builder.append(" ["); builder.append(" [");
builder.append(record.getLevel().getLocalizedName().toUpperCase()); builder.append(record.getLevel().getLocalizedName().toUpperCase());
builder.append("] "); builder.append("] ");
builder.append(record.getMessage()); builder.append(formatMessage(record));
builder.append('\n'); builder.append('\n');
if (ex != null) { if (ex != null) {