Fix: app randomly hung when the upload queue is full (#231)
This commit is contained in:
@@ -55,15 +55,22 @@ public class Log {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void append(String level_, String msg_) {
|
private void append(String level_, String msg_) {
|
||||||
if (msg_.equals("") == false) {
|
String line = null;
|
||||||
String line = this.dateFormat.format(new java.util.Date()) + " (" + level_ + ") " + msg_;
|
|
||||||
if (this.checkpoints.containsKey(this.lastCheckPoint) && this.checkpoints.get(this.lastCheckPoint) != null) {
|
try {
|
||||||
this.checkpoints.get(this.lastCheckPoint).add(line);
|
if (msg_.equals("") == false) {
|
||||||
}
|
line = this.dateFormat.format(new java.util.Date()) + " (" + level_ + ") " + msg_;
|
||||||
if (this.printStdOut == true) {
|
if (this.checkpoints.containsKey(this.lastCheckPoint) && this.checkpoints.get(this.lastCheckPoint) != null) {
|
||||||
System.out.println(line);
|
this.checkpoints.get(this.lastCheckPoint).add(line);
|
||||||
|
}
|
||||||
|
if (this.printStdOut == true) {
|
||||||
|
System.out.println(line);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
// Nothing to do here. Just allow the thread to continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int newCheckPoint() {
|
public int newCheckPoint() {
|
||||||
|
|||||||
Reference in New Issue
Block a user