Skip to content

Commit

Permalink
Update KtorSimpleLoggerJs.kt (#4002)
Browse files Browse the repository at this point in the history
(cherry picked from commit ff7c004)
  • Loading branch information
aggarwalpulkit596 authored and e5l committed Apr 4, 2024
1 parent 9b958b8 commit 3787bf6
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -10,7 +10,7 @@ import io.ktor.util.*
public actual fun KtorSimpleLogger(name: String): Logger = object : Logger {

@OptIn(kotlin.ExperimentalStdlibApi::class)
override val level: LogLevel = when (PlatformUtils.IS_NODE) {
override val level: LogLevel = when (PlatformUtils.IS_NODE || PlatformUtils.IS_BROWSER) {
true -> runCatching { js("process.env.KTOR_LOG_LEVEL") as String? }
.getOrNull()
?.let { rawLevel: String -> LogLevel.values().firstOrNull { it.name == rawLevel } }
Expand Down

0 comments on commit 3787bf6

Please sign in to comment.