From e2009a3e33a58bab37f433845f6d105cb7821da1 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 31 Dec 2017 15:07:05 -0500 Subject: Enhancement/logger (#120) * Rewrite logger to use lazy loading * Clean up and add to changelog --- sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt | 2 +- sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sample/src/main/kotlin') 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 -- cgit v1.2.3