Add Napier logger library
This commit is contained in:
+1
-3
@@ -20,16 +20,14 @@ class AuthApi(
|
||||
) {
|
||||
suspend fun login(username: String, password: String): Boolean {
|
||||
return try {
|
||||
println(">>>>> Check LOGIN Api")
|
||||
val res: LoginResponseDto = client.post("$baseUrl${Endpoints.AUTH_TOKEN}") {
|
||||
contentType(ContentType.Application.Json)
|
||||
setBody(LoginRequestDto(username, password))
|
||||
}.body()
|
||||
println(res)
|
||||
tokenManager.saveTokens(res.access, res.refresh)
|
||||
true
|
||||
} catch (e: Exception) {
|
||||
println(">>>>> [AuthApi] Exception: $e")
|
||||
println(">>>>> [AuthApi.kt] Exception: $e")
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.digitoolsolutions.app.torquevaultkmp.utils
|
||||
|
||||
import io.github.aakira.napier.Antilog
|
||||
import io.github.aakira.napier.LogLevel
|
||||
|
||||
class NoOpAntilog : Antilog() {
|
||||
override fun isEnable(priority: LogLevel, tag: String?): Boolean = false
|
||||
override fun performLog(priority: LogLevel, tag: String?, throwable: Throwable?, message: String?) {}
|
||||
}
|
||||
Reference in New Issue
Block a user