Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 21:10:10 +01:00
Use standard format function to format logs. Addresses BUKKIT-2246
Also fix "excess" Log Levels.
Dieser Commit ist enthalten in:
Ursprung
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) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren