diff --git a/app/src/main/java/ani/dantotsu/connections/anilist/Anilist.kt b/app/src/main/java/ani/dantotsu/connections/anilist/Anilist.kt index dae4150c28..18321cbaac 100644 --- a/app/src/main/java/ani/dantotsu/connections/anilist/Anilist.kt +++ b/app/src/main/java/ani/dantotsu/connections/anilist/Anilist.kt @@ -163,7 +163,7 @@ object Anilist { throw Exception("Rate limited after $retry seconds") } if (!json.text.startsWith("{")) {throw Exception(currContext()?.getString(R.string.anilist_down))} - if (show) println("Response : ${json.text}") + if (show) Logger.log("Anilist Query: ${json.text}") json.parsed() } else null } catch (e: Exception) { diff --git a/app/src/main/java/ani/dantotsu/connections/anilist/AnilistQueries.kt b/app/src/main/java/ani/dantotsu/connections/anilist/AnilistQueries.kt index dd1edc8d32..a298f94da2 100644 --- a/app/src/main/java/ani/dantotsu/connections/anilist/AnilistQueries.kt +++ b/app/src/main/java/ani/dantotsu/connections/anilist/AnilistQueries.kt @@ -23,6 +23,7 @@ import ani.dantotsu.others.MalScraper import ani.dantotsu.settings.saving.PrefManager import ani.dantotsu.settings.saving.PrefName import ani.dantotsu.snackString +import ani.dantotsu.util.Logger import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.runBlocking @@ -464,7 +465,8 @@ class AnilistQueries { }, recommendationPlannedQueryManga: ${recommendationPlannedQuery("MANGA")}""" query += """}""".trimEnd(',') - val response = executeQuery(query) + val response = executeQuery(query, show = true) + Logger.log(response.toString()) val returnMap = mutableMapOf>() fun current(type: String) { val subMap = mutableMapOf() diff --git a/app/src/main/java/ani/dantotsu/util/Logger.kt b/app/src/main/java/ani/dantotsu/util/Logger.kt index a8dfb631d0..ed8fdc4215 100644 --- a/app/src/main/java/ani/dantotsu/util/Logger.kt +++ b/app/src/main/java/ani/dantotsu/util/Logger.kt @@ -94,7 +94,7 @@ object Logger { if (file == null) e.printStackTrace() else { file?.appendText("---------------------------Exception---------------------------\n") file?.appendText("date/time: ${Date()} | ${e.message}\n") - file?.appendText("trace: ${e.stackTrace}\n") + file?.appendText("trace: ${e.stackTraceToString()}\n") } } } @@ -104,7 +104,7 @@ object Logger { if (file == null) e.printStackTrace() else { file?.appendText("---------------------------Exception---------------------------\n") file?.appendText("date/time: ${Date()} | ${e.message}\n") - file?.appendText("trace: ${e.stackTrace}\n") + file?.appendText("trace: ${e.stackTraceToString()}\n") } } }