调整日志收集的参数
This commit is contained in:
parent
059bfaf1d9
commit
8455c360fc
@ -42,8 +42,8 @@ public class LogUtils {
|
|||||||
File dir = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator);
|
File dir = new File(context.getDir("files", Context.MODE_PRIVATE).getAbsolutePath() + File.separator);
|
||||||
if (dir.listFiles() != null) {
|
if (dir.listFiles() != null) {
|
||||||
for (File file : dir.listFiles()) {
|
for (File file : dir.listFiles()) {
|
||||||
if (!file.getName().endsWith(".log") && !"error.log".equals(file.getName())) {
|
if (file.getName().endsWith(".log") && !"error.log".equals(file.getName())) {
|
||||||
String fileName = file.getName().replace(title, "");
|
String fileName = file.getName().replace(title, "").replace(".log", "");
|
||||||
if (isDelLog(fileName)) {
|
if (isDelLog(fileName)) {
|
||||||
file.delete();
|
file.delete();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user