Needed to add an exception for the log to work.

This commit is contained in:
Amine 2017-08-30 07:22:28 +02:00
parent b39d510e07
commit 4b8396959d
2 changed files with 10 additions and 2 deletions

View File

@ -128,8 +128,12 @@ class ItemCardAdapter(private val app: Activity,
override fun onResponse(call: Call<SuccessResponse>, response: Response<SuccessResponse>) {
if (debugReadingItems) {
val message =
"message: ${response.message()} body: ${response.body()} raw body string: ${response.raw()?.body()?.toString()}"
"message: ${response.message()} " +
"body success: ${response.body()?.success} " +
"body isSuccess: ${response.body()?.isSuccess} " +
"raw body string: ${response.raw()?.body()?.string()}"
Crashlytics.log(100, "READ_DEBUG_SUCCESS", message)
Crashlytics.logException(Exception("Was success, but did it work ?"))
Toast.makeText(c, message, Toast.LENGTH_LONG).show()
}
doUnmark(i, position)

View File

@ -137,8 +137,12 @@ class ItemListAdapter(private val app: Activity,
override fun onResponse(call: Call<SuccessResponse>, response: Response<SuccessResponse>) {
if (debugReadingItems) {
val message =
"message: ${response.message()} body: ${response.body()} raw body string: ${response.raw()?.body()?.toString()}"
"message: ${response.message()} " +
"body success: ${response.body()?.success} " +
"body isSuccess: ${response.body()?.isSuccess} " +
"raw body string: ${response.raw()?.body()?.string()}"
Crashlytics.log(100, "READ_DEBUG_SUCCESS", message)
Crashlytics.logException(Exception("Was success, but did it work ?"))
Toast.makeText(c, message, Toast.LENGTH_LONG).show()
}
doUnmark(i, position)