Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
| 29 | 30 | 31 |
Tags
- shotcut
- 이미지 gps
- itemAnimator
- kdoc-generator
- prettyJson
- datastore
- Android
- ChromeCustomTab
- Blinking
- room
- ExifInterface
- circlecrop
- application
- notification setting
- notification bar
- BottomSheetDialog
- webview
- LOG
- jsontokotlinclass
- requestPermission
- skipcollapsed
- navigation component
- 403 Error
- onResume
- App Startup
- Plugins
- onReceivedSslError
- Git
- ActivityResultContracts
- notification
Archives
- Today
- Total
목록LOG (2)
Debbi Story
[Android] OkHttpClient + Moshi response Log 보기 쉽게 출력하기!
안녕하세요. 보통 네트워크 통신 응답을 Log로 찍게되면 줄바꿈이 안되고 내용이 많을땐 짤려서 보이게 됩니다. 아래처럼 사용하시면 json형식으로 보기 쉽게 출력이 됩니다! val logger = HttpLoggingInterceptor.Logger { message -> if (!message.startsWith("{") && !message.startsWith("[")) { Timber.tag("OkHttp").d(message) return@Logger } try { val source = Buffer().writeUtf8(message) val reader = JsonReader.of(source) val value = reader.readJsonValue() val adapter = Moshi...
안드로이드/Tip
2022. 1. 3. 00:13