Hello! Is there any way to show logs on Desktop? I...
# compose-desktop
a
Hello! Is there any way to show logs on Desktop? I usually use Kermit, but when I’m working with Desktop, there isn’t any “connected device” in Logcat. Solution: In "run" console you can find it!
a
You can also use a library like log4j or log4k, or simply redirect output to a file with e.g.
Copy code
private fun configureStdStreams() {
    val logFile = File(LOGS_DIR, "log.txt")
    val logFileStream = PrintStream(logFile.outputStream())
    System.setOut(logFileStream)
    System.setErr(logFileStream)
}
a
So cool! Thank you
What about debugging? Is there any way to do it?
a
Same way as on Android