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
Alexander Maryanovsky
11/28/2024, 8:05 PM
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)
}