https://kotlinlang.org logo
Title
r

Rachid

04/24/2020, 12:18 PM
Hi all, I'm playing around with ktor and now want to add application logging. I have a lot of
println
statements which I want to convert to INFO, DEBUG, etc When searching the internet I didn't find any good examples of how this could work in ktor. Only a minimal example of how to add logback for enabling logging in the frameworks used by ktor itself (like Netty). So know my question. Do you have any suggestions? And pointers/links to examples would be very helpful.
I would prefer lazy evaluation (so that it only evaluates DEBUG when that level is enabled). And being multiplatform would be a big pro as well.
I'm giving kotlin-logging a try 🙂
e

edenman

04/24/2020, 8:02 PM
i ended up just writing my own expect/actual log methods so I could delegate to Timber on Android and then let iOS do whatever it wants
👀 1