Skip to content

Commit

Permalink
Replace printStackTrace calls with logging
Browse files Browse the repository at this point in the history
  • Loading branch information
MaT1g3R committed Oct 9, 2023
1 parent c9ed0f1 commit 2deb969
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/java/str_exporter/CustomTipsAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public Object[] getTipsFromMods() {
}

} catch (IllegalAccessException e) {
e.printStackTrace();
logger.error(e);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/str_exporter/SlayTheRelicsExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private User getOauthToken(String state) {
try {
return ebsClient.verifyCredentials(token);
} catch (IOException e) {
e.printStackTrace();
logger.error(e);
return null;
}
}
Expand Down
8 changes: 3 additions & 5 deletions src/main/java/str_exporter/client/BackendBroadcaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ public class BackendBroadcaster {
private long messageTimestamp;
private final ReentrantLock queueLock;
private final Thread worker;
private final long checkQueuePeriodMillis;
private final boolean sendDuplicates;
private final Config config;
private final EBSClient client;

public BackendBroadcaster(Config config, EBSClient client, long checkQueuePeriodMillis, boolean sendDuplicates) {
this.checkQueuePeriodMillis = checkQueuePeriodMillis;
this.sendDuplicates = sendDuplicates;
this.config = config;
this.client = client;
Expand All @@ -40,7 +38,7 @@ public BackendBroadcaster(Config config, EBSClient client, long checkQueuePeriod
try {
Thread.sleep(checkQueuePeriodMillis);
} catch (InterruptedException e) {
e.printStackTrace();
logger.error(e);
}
}
});
Expand Down Expand Up @@ -77,7 +75,7 @@ private void readQueue() {
message = null;
}
} catch (Exception e) {
e.printStackTrace();
logger.error(e);
} finally {
queueLock.unlock();
if (!msg.isEmpty()) {
Expand All @@ -86,7 +84,7 @@ private void readQueue() {
try {
broadcastMessage(msg);
} catch (Exception e) {
e.printStackTrace();
logger.error(e);
}
}
}
Expand Down

0 comments on commit 2deb969

Please sign in to comment.