`log()` function… because it’s not in the ```org.j...
# ktor
c
log()
function… because it’s not in the
Copy code
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3
library…
r
What
log
function are you referring to? I'm not aware of a standard function called that anywhere in Kotlin.
j
Copy code
fun log(msg: String) = println("[${Thread.currentThread().name}] $msg")
see here: https://github.com/kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/jvm/test/guide/example-context-03.kt
👍 1
c
This is good to see what’s happening under the hood, but I assumed this would be imported with the library… 😕
r
Nope, just a little helper function they defined for the example. If you actually want to log in specific formats, you should probably use a dedicated library for that, most probably using the SLF4J standard. Logback comes to mind, for example.