Skip to content

Commit

Permalink
refactor(Addongs log tab): Remove not needed fields and constructor p…
Browse files Browse the repository at this point in the history
…arams. Display full logs without truncating.
  • Loading branch information
Griefed committed Jun 5, 2022
1 parent 2a4bc52 commit 1504a8e
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
public class TabServerPackCreatorLog extends JComponentTailer {

private final LocalizationManager LOCALIZATIONMANAGER;
private final ApplicationProperties APPLICATIONPROPERTIES;

/**
* <strong>Constructor</strong>
Expand All @@ -57,10 +56,11 @@ public class TabServerPackCreatorLog extends JComponentTailer {
public TabServerPackCreatorLog(
LocalizationManager injectedLocalizationManager,
ApplicationProperties injectedApplicationProperties) {
ApplicationProperties APPLICATIONPROPERTIES;
if (injectedApplicationProperties == null) {
this.APPLICATIONPROPERTIES = new ApplicationProperties();
APPLICATIONPROPERTIES = new ApplicationProperties();
} else {
this.APPLICATIONPROPERTIES = injectedApplicationProperties;
APPLICATIONPROPERTIES = injectedApplicationProperties;
}

if (injectedLocalizationManager == null) {
Expand All @@ -83,12 +83,12 @@ public void handle(String line) {
textArea.setText("");
}
if (!line.contains("DEBUG")) {
textArea.append(line.substring(line.lastIndexOf(") - ") + 3) + "\n");
textArea.append(line + "\n");
}
}
}
TailerListener tailerListener = new MyTailerListener();
Tailer tailer = new Tailer(new File("./logs/serverpackcreator.log"), tailerListener, 100);
Tailer tailer = new Tailer(new File("./logs/serverpackcreator.log"), tailerListener, 200);
Thread thread = new Thread(tailer);
thread.setDaemon(true);
thread.start();
Expand Down

0 comments on commit 1504a8e

Please sign in to comment.