Skip to content

Commit

Permalink
Fix resetConsoleColor creates empty line on Paper warn/err logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Rothes committed Aug 9, 2024
1 parent b5907de commit c36521d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ public void format(LogEvent event, StringBuilder toAppendTo) {
} else {
ConfigManager configManager = plugin.getConfigManager();
if (configManager != null && configManager.resetConsoleColor) {
toAppendTo.append("\u001b[0m");
for (int i = toAppendTo.length() - 1; i >= 0; i--) {
if (toAppendTo.charAt(i) == '\n') {
toAppendTo.insert(i, "\u001b[0m");
}
}
}
}
}
Expand Down

0 comments on commit c36521d

Please sign in to comment.