aboutsummaryrefslogtreecommitdiff
path: root/sample/src/main/kotlin
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-31 15:07:05 -0500
committerGitHub <noreply@github.com>2017-12-31 15:07:05 -0500
commite2009a3e33a58bab37f433845f6d105cb7821da1 (patch)
treeb23f3587db872be7b7ac6a4885862c7d56e35be3 /sample/src/main/kotlin
parent2718156fe63304ffb792cc3cb8592ad6e494a8b0 (diff)
downloadkau-e2009a3e33a58bab37f433845f6d105cb7821da1.tar.gz
kau-e2009a3e33a58bab37f433845f6d105cb7821da1.tar.bz2
kau-e2009a3e33a58bab37f433845f6d105cb7821da1.zip
Enhancement/logger (#120)
* Rewrite logger to use lazy loading * Clean up and add to changelog
Diffstat (limited to 'sample/src/main/kotlin')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt2
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt2
2 files changed, 2 insertions, 2 deletions
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
index 3f25ac3..2ba3366 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
@@ -32,7 +32,7 @@ class AnimActivity : KauBaseActivity() {
PERMISSION_CAMERA
).map { PermissionCheckbox(it) })
adapter.withOnClickListener { _, _, item, _ ->
- KL.d("Perm Click")
+ KL.d { "Perm Click" }
kauRequestPermissions(item.permission) { granted, _ ->
toast("${item.permission} enabled: $granted")
adapter.notifyAdapterDataSetChanged()
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt
index 541eaec..30c877b 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt
@@ -9,7 +9,7 @@ import ca.allanwang.kau.logging.KL
class SampleApp : Application() {
override fun onCreate() {
super.onCreate()
- KL.debug(BuildConfig.DEBUG)
+ KL.enabled = BuildConfig.DEBUG
KPrefSample.initialize(this, "pref_sample")
}
} \ No newline at end of file