Skip to content

Commit f662a54

Browse files
committed
Externalize hostname to allow users to set to an appropriate value for their environment.
1 parent d26a764 commit f662a54

File tree

1 file changed

+3
-2
lines changed
  • lib/src/main/java/com/mazenrashed/logdnaandroidclient

1 file changed

+3
-2
lines changed

lib/src/main/java/com/mazenrashed/logdnaandroidclient/LogDna.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@ import kotlin.collections.ArrayList
1414

1515
object LogDna {
1616

17-
private const val hostName = "Android App"
17+
private var hostName = "Android App"
1818
private var apiKey: String? = null
1919
var appName: String? = null
2020
var logResults = PublishRelay.create<LogResult>()
2121
var logResultsListener: ((LogResult) -> Unit)? = null
2222

23-
fun init(apiKey: String, appName: String?) {
23+
fun init(apiKey: String, appName: String?, hostName: String?) {
2424
this.apiKey = apiKey
2525
this.appName = appName
26+
hostName?.let{ this.hostName = it }
2627
}
2728

2829
fun log(line: Line) {

0 commit comments

Comments
 (0)