Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MiYaFastCashier
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangjiantao
MiYaFastCashier
Commits
c1d3e9a0
Commit
c1d3e9a0
authored
May 16, 2022
by
赵鹏翔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网络日志写入本地文件
parent
10b5b968
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
ApiRequest.kt
app/src/main/java/com/miya/fastcashier/net/ApiRequest.kt
+3
-0
No files found.
app/src/main/java/com/miya/fastcashier/net/ApiRequest.kt
View file @
c1d3e9a0
package
com.miya.fastcashier.net
package
com.miya.fastcashier.net
import
android.util.Log
import
android.util.Log
import
com.miya.fastcashier.BaseApplication
import
com.miya.fastcashier.beans.SelfCashierAccountInfo
import
com.miya.fastcashier.beans.SelfCashierAccountInfo
import
com.miya.fastcashier.beans.LoginRequest;
import
com.miya.fastcashier.beans.LoginRequest;
import
com.miya.fastcashier.utils.LogFileUtils
import
okhttp3.MultipartBody
import
okhttp3.MultipartBody
import
okhttp3.OkHttpClient
import
okhttp3.OkHttpClient
import
retrofit2.Retrofit
import
retrofit2.Retrofit
...
@@ -29,6 +31,7 @@ class ApiRequest private constructor() {
...
@@ -29,6 +31,7 @@ class ApiRequest private constructor() {
val
httpLoggingInterceptor
=
val
httpLoggingInterceptor
=
MiyaHttpLoggingInterceptor
{
MiyaHttpLoggingInterceptor
{
Log
.
e
(
"####"
,
it
)
Log
.
e
(
"####"
,
it
)
LogFileUtils
.
writeLog
(
BaseApplication
.
getApplication
(),
it
)
}.
apply
{
level
=
MiyaHttpLoggingInterceptor
.
Level
.
BODY
}
}.
apply
{
level
=
MiyaHttpLoggingInterceptor
.
Level
.
BODY
}
val
client
=
OkHttpClient
.
Builder
()
val
client
=
OkHttpClient
.
Builder
()
...
...
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