aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/facebook
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-06-30 10:36:38 -0700
committerAllan Wang <me@allanwang.ca>2017-06-30 10:36:38 -0700
commit7267064d8a007e49bf05c3fc68b6338209a7c784 (patch)
tree676f2ab385b975f6ffd9b534fc8bcc11ac542635 /app/src/main/kotlin/com/pitchedapps/frost/facebook
parenta42519030892ede729fc37ce6cbc93bb1d80989c (diff)
downloadfrost-7267064d8a007e49bf05c3fc68b6338209a7c784.tar.gz
frost-7267064d8a007e49bf05c3fc68b6338209a7c784.tar.bz2
frost-7267064d8a007e49bf05c3fc68b6338209a7c784.zip
Remove user info in debug logs
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt13
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/UsernameFetcher.kt2
2 files changed, 8 insertions, 7 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt
index f5f8a8f7..875f1c49 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt
@@ -26,12 +26,12 @@ object FbCookie {
callback?.invoke()
return@removeAllCookies
}
- L.d("Setting cookie to $cookie")
+ L.d("Setting cookie", cookie)
val cookies = cookie.split(";").map { Pair(it, SingleSubject.create<Boolean>()) }
cookies.forEach { (cookie, callback) -> setCookie(FB_URL_BASE, cookie, { callback.onSuccess(it) }) }
Observable.zip<Boolean, Unit>(cookies.map { (_, callback) -> callback.toObservable() }, {}).subscribeOn(AndroidSchedulers.mainThread()).subscribe({
callback?.invoke()
- L.d("Cookies set: $webCookie")
+ L.d("Cookies set", webCookie)
flush()
})
})
@@ -39,7 +39,7 @@ object FbCookie {
}
operator fun invoke() {
- L.d("User ${Prefs.userId}")
+ L.d("FbCookie Invoke User", Prefs.userId.toString())
with(CookieManager.getInstance()) {
setAcceptCookie(true)
}
@@ -51,7 +51,7 @@ object FbCookie {
}
fun save(id: Long) {
- L.d("New cookie found for $id")
+ L.d("New cookie found", id.toString())
Prefs.userId = id
CookieManager.getInstance().flush()
val cookie = CookieModel(Prefs.userId, "", webCookie)
@@ -74,10 +74,11 @@ object FbCookie {
fun switchUser(cookie: CookieModel?, callback: () -> Unit) {
if (cookie == null) {
+ L.d("Switching User; null cookie")
callback()
return
}
- L.d("Switching user to $cookie")
+ L.d("Switching User", cookie.toString())
Prefs.userId = cookie.id
setWebCookie(cookie.cookie, callback)
}
@@ -95,7 +96,7 @@ object FbCookie {
fun switchBackUser(callback: () -> Unit) {
if (Prefs.prevId != -1L && Prefs.prevId != Prefs.userId) {
switchUser(Prefs.prevId) {
- L.d("Switched from ${Prefs.userId} to ${Prefs.prevId}")
+ L.d("Switch back user", "${Prefs.userId} to ${Prefs.prevId}")
callback()
}
} else callback()
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/UsernameFetcher.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/UsernameFetcher.kt
index cbb6222a..dfdfa027 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/UsernameFetcher.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/UsernameFetcher.kt
@@ -19,7 +19,7 @@ object UsernameFetcher {
name = Jsoup.connect(FbTab.PROFILE.url)
.cookie(FACEBOOK_COM, data.cookie)
.get().title()
- L.d("User name found: $name")
+ L.d("User name found", name)
} catch (e: Exception) {
L.e(e, "User name fetching failed")
} finally {