Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit db97ed7

Browse files
committed
Fix response log marked as request one
1 parent 197c86e commit db97ed7

File tree

1 file changed

+4
-4
lines changed
  • owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http

1 file changed

+4
-4
lines changed

owncloudComLibrary/src/main/java/com/owncloud/android/lib/common/http/LogInterceptor.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,20 @@ class LogInterceptor : Interceptor {
139139

140140
if (!buffer.isProbablyUtf8()) {
141141
logHttp(
142-
REQUEST,
142+
RESPONSE,
143143
BODY,
144144
requestId,
145145
"<-- Body end for request -- Binary -- Omitted: ${responseBody.contentLength()} bytes"
146146
)
147147
}
148148

149149
if (responseBody.contentLength() < LIMIT_BODY_LOG) {
150-
logHttp(REQUEST, BODY, requestId, buffer.clone().readString(charset))
150+
logHttp(RESPONSE, BODY, requestId, buffer.clone().readString(charset))
151151
} else {
152-
logHttp(REQUEST, BODY, requestId, buffer.clone().readString(LIMIT_BODY_LOG, charset))
152+
logHttp(RESPONSE, BODY, requestId, buffer.clone().readString(LIMIT_BODY_LOG, charset))
153153
}
154154
logHttp(
155-
REQUEST,
155+
RESPONSE,
156156
BODY,
157157
requestId,
158158
"<-- Body end for request -- Omitted: ${max(0, responseBody.contentLength() - LIMIT_BODY_LOG)} bytes"

0 commit comments

Comments
 (0)