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_) {
|
||||
if (msg_.equals("") == false) {
|
||||
String line = this.dateFormat.format(new java.util.Date()) + " (" + level_ + ") " + msg_;
|
||||
if (this.checkpoints.containsKey(this.lastCheckPoint) && this.checkpoints.get(this.lastCheckPoint) != null) {
|
||||
this.checkpoints.get(this.lastCheckPoint).add(line);
|
||||
}
|
||||
if (this.printStdOut == true) {
|
||||
System.out.println(line);
|
||||
String line = null;
|
||||
|
||||
try {
|
||||
if (msg_.equals("") == false) {
|
||||
line = this.dateFormat.format(new java.util.Date()) + " (" + level_ + ") " + msg_;
|
||||
if (this.checkpoints.containsKey(this.lastCheckPoint) && this.checkpoints.get(this.lastCheckPoint) != null) {
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user