Commit aaa56cea by pye52

1、更新第三方库版本

2、现在只保留日志设置保留期限
parent 47474660
...@@ -114,11 +114,11 @@ dependencies { ...@@ -114,11 +114,11 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation "org.java-websocket:Java-WebSocket:1.4.0" implementation "org.java-websocket:Java-WebSocket:1.4.0"
implementation 'com.blankj:utilcodex:1.28.3' implementation 'com.blankj:utilcodex:1.28.4'
def okhttp_version = "4.5.0" def okhttp_version = "4.6.0"
implementation "com.squareup.okhttp3:okhttp:$okhttp_version" implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version" implementation "com.squareup.okhttp3:logging-interceptor:$okhttp_version"
def retrofit_version = "2.7.1" def retrofit_version = "2.8.1"
implementation "com.squareup.retrofit2:retrofit:$retrofit_version" implementation "com.squareup.retrofit2:retrofit:$retrofit_version"
implementation "com.squareup.retrofit2:converter-gson:$retrofit_version" implementation "com.squareup.retrofit2:converter-gson:$retrofit_version"
implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version" implementation "com.squareup.retrofit2:converter-scalars:$retrofit_version"
......
...@@ -12,6 +12,8 @@ import java.io.File; ...@@ -12,6 +12,8 @@ import java.io.File;
public class RootApp extends Application { public class RootApp extends Application {
private static final String LOG_PREFIX = "app"; private static final String LOG_PREFIX = "app";
private static final String LOG_DIR = "log"; private static final String LOG_DIR = "log";
// 设置日志保存期限,避免日志过多占用内存空间
private static final int LOG_SAVE_DAYS = 7;
@Override @Override
public void onCreate() { public void onCreate() {
...@@ -23,6 +25,7 @@ public class RootApp extends Application { ...@@ -23,6 +25,7 @@ public class RootApp extends Application {
.setDir(logDir) .setDir(logDir)
.setLog2FileSwitch(true) .setLog2FileSwitch(true)
.setBorderSwitch(false) .setBorderSwitch(false)
.setFilePrefix(LOG_PREFIX); .setFilePrefix(LOG_PREFIX)
.setSaveDays(LOG_SAVE_DAYS);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment