Skip to content

Commit

Permalink
Update KtorSimpleLoggerJs.kt (#4002)
Browse files Browse the repository at this point in the history
  • Loading branch information
aggarwalpulkit596 committed Mar 21, 2024
1 parent 6e52d76 commit ff7c004
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -11,7 +11,7 @@ private fun getKtorLogLevel(): String? = js("process.env.KTOR_LOG_LEVEL")
@Suppress("FunctionName")
public actual fun KtorSimpleLogger(name: String): Logger = object : Logger {

override val level: LogLevel = when (PlatformUtils.IS_NODE) {
override val level: LogLevel = when (PlatformUtils.IS_NODE || PlatformUtils.IS_BROWSER) {
true -> runCatching { getKtorLogLevel() }
.getOrNull()
?.let { rawLevel: String -> LogLevel.entries.firstOrNull { it.name == rawLevel } }
Expand Down

0 comments on commit ff7c004

Please sign in to comment.