Skip to content

Commit

Permalink
better log rollback exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Brokkonaut committed Jan 3, 2023
1 parent 5d91d5a commit c3ae835
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/de/diddiz/LogBlock/WorldEditor.java
Expand Up @@ -185,8 +185,11 @@ public synchronized void run() {
final File file = new File("plugins/LogBlock/error/WorldEditor-" + new SimpleDateFormat("yy-MM-dd-HH-mm-ss").format(System.currentTimeMillis()) + ".log");
file.getParentFile().mkdirs();
final PrintWriter writer = new PrintWriter(file);
for (final LookupCacheElement err : errorList) {
for (final WorldEditorException err : errorList) {
writer.println(BaseComponent.toPlainText(err.getLogMessage()));
err.printStackTrace(writer);
writer.println();
writer.println();
}
writer.close();
} catch (final Exception ex) {
Expand Down

0 comments on commit c3ae835

Please sign in to comment.