From f662a5429998d1fe8d4bcb01e4609f861d97d546 Mon Sep 17 00:00:00 2001 From: Bob Date: Thu, 12 Sep 2019 16:28:06 -0700 Subject: [PATCH] Externalize hostname to allow users to set to an appropriate value for their environment. --- .../main/java/com/mazenrashed/logdnaandroidclient/LogDna.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/com/mazenrashed/logdnaandroidclient/LogDna.kt b/lib/src/main/java/com/mazenrashed/logdnaandroidclient/LogDna.kt index 5850e91..907ce15 100755 --- a/lib/src/main/java/com/mazenrashed/logdnaandroidclient/LogDna.kt +++ b/lib/src/main/java/com/mazenrashed/logdnaandroidclient/LogDna.kt @@ -14,15 +14,16 @@ import kotlin.collections.ArrayList object LogDna { - private const val hostName = "Android App" + private var hostName = "Android App" private var apiKey: String? = null var appName: String? = null var logResults = PublishRelay.create() var logResultsListener: ((LogResult) -> Unit)? = null - fun init(apiKey: String, appName: String?) { + fun init(apiKey: String, appName: String?, hostName: String?) { this.apiKey = apiKey this.appName = appName + hostName?.let{ this.hostName = it } } fun log(line: Line) {