修复启动器未压缩日志的问题 (#3877)
This commit is contained in:
@@ -143,10 +143,7 @@ public final class Logger {
|
|||||||
log(Level.WARNING, caller, "Failed to list log files in " + dir, e);
|
log(Level.WARNING, caller, "Failed to list log files in " + dir, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list.size() <= logRetention) {
|
if (list.size() > logRetention) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
list.sort((a, b) -> {
|
list.sort((a, b) -> {
|
||||||
int[] v1 = a.getValue();
|
int[] v1 = a.getValue();
|
||||||
int[] v2 = b.getValue();
|
int[] v2 = b.getValue();
|
||||||
@@ -175,6 +172,7 @@ public final class Logger {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ArrayList<LogEvent> logs = new ArrayList<>();
|
ArrayList<LogEvent> logs = new ArrayList<>();
|
||||||
queue.drainTo(logs);
|
queue.drainTo(logs);
|
||||||
|
|||||||
Reference in New Issue
Block a user