mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 13:06:02 +01:00
Use standard format function to format logs. Addresses BUKKIT-2246
Also fix "excess" Log Levels.
This commit is contained in:
parent
161ab5edc6
commit
450edc3004
@ -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();
|
||||||
|
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user