修复启动器未压缩日志的问题 (#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);
|
||||
}
|
||||
|
||||
if (list.size() <= logRetention) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (list.size() > logRetention) {
|
||||
list.sort((a, b) -> {
|
||||
int[] v1 = a.getValue();
|
||||
int[] v2 = b.getValue();
|
||||
@@ -175,6 +172,7 @@ public final class Logger {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<LogEvent> logs = new ArrayList<>();
|
||||
queue.drainTo(logs);
|
||||
|
||||
Reference in New Issue
Block a user