Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
aaa56cea
authored
May 07, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、更新第三方库版本
2、现在只保留日志设置保留期限
parent
47474660
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
app/build.gradle
+3
-3
app/src/main/java/com/bgycc/smartcanteen/RootApp.java
+4
-1
No files found.
app/build.gradle
View file @
aaa56cea
...
...
@@ -114,11 +114,11 @@ dependencies {
androidTestImplementation
'androidx.test.ext:junit:1.1.1'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.2.0'
implementation
"org.java-websocket:Java-WebSocket:1.4.0"
implementation
'com.blankj:utilcodex:1.28.
3
'
def
okhttp_version
=
"4.
5
.0"
implementation
'com.blankj:utilcodex:1.28.
4
'
def
okhttp_version
=
"4.
6
.0"
implementation
"com.squareup.okhttp3:okhttp:$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:converter-gson:$retrofit_version"
implementation
"com.squareup.retrofit2:converter-scalars:$retrofit_version"
...
...
app/src/main/java/com/bgycc/smartcanteen/RootApp.java
View file @
aaa56cea
...
...
@@ -12,6 +12,8 @@ import java.io.File;
public
class
RootApp
extends
Application
{
private
static
final
String
LOG_PREFIX
=
"app"
;
private
static
final
String
LOG_DIR
=
"log"
;
// 设置日志保存期限,避免日志过多占用内存空间
private
static
final
int
LOG_SAVE_DAYS
=
7
;
@Override
public
void
onCreate
()
{
...
...
@@ -23,6 +25,7 @@ public class RootApp extends Application {
.
setDir
(
logDir
)
.
setLog2FileSwitch
(
true
)
.
setBorderSwitch
(
false
)
.
setFilePrefix
(
LOG_PREFIX
);
.
setFilePrefix
(
LOG_PREFIX
)
.
setSaveDays
(
LOG_SAVE_DAYS
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment