Improvement: Text GUI: only log if status has changed
This commit is contained in:
@@ -106,7 +106,10 @@ public class GuiText implements Gui {
|
||||
}
|
||||
|
||||
@Override public void status(String msg_, boolean overwriteSuspendedMsg) {
|
||||
boolean statusChanged = !statusOld.equals(msg_);
|
||||
if (statusChanged) {
|
||||
log.debug("GUI " + msg_);
|
||||
}
|
||||
|
||||
if (client != null && client.isSuspended()) {
|
||||
if (overwriteSuspendedMsg) {
|
||||
@@ -114,9 +117,8 @@ public class GuiText implements Gui {
|
||||
}
|
||||
}
|
||||
else {
|
||||
String statusNew = msg_;
|
||||
if (statusOld.equals(statusNew) == false) {
|
||||
statusOld = statusNew;
|
||||
if (statusChanged) {
|
||||
statusOld = msg_;
|
||||
System.out.println(String.format("%s %s", this.df.format(new Date()), msg_));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user