Skip to content

Commit

Permalink
Improve tryInitLogFromEnv logic
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIMP authored and J-Loudet committed Sep 16, 2024
1 parent c97136e commit 8636173
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions zenoh-kotlin/src/commonMain/kotlin/io/zenoh/Zenoh.kt
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,11 @@ object Zenoh {
* @see Logger
*/
fun tryInitLogFromEnv() {
ZenohLoad
Logger.start(System.getenv(LOG_ENV) ?: "")
val logEnv = System.getenv(LOG_ENV)
if (logEnv != null) {
ZenohLoad
Logger.start(logEnv)
}
}

/**
Expand Down

0 comments on commit 8636173

Please sign in to comment.