https://kotlinlang.org logo
Title
d

Dalinar

01/25/2019, 2:51 PM
I need a good logging library, should I look only in the java world? or is there a good Kotlin logging library?
:java: 3
c

Czar

01/25/2019, 2:53 PM
SLF4J is still the standard, in :kotlin: world there is a neat wrapper for it: Micro Utils Kotlin Logging: https://github.com/MicroUtils/kotlin-logging
👍 1
f

fred.deschenes

01/25/2019, 2:56 PM
I also made this a couple years ago (hasn't been updated to newer Kotlin versions but should still work fine) : https://github.com/FrimaStudio/slf4j-kotlin-extensions
d

Dalinar

01/25/2019, 3:10 PM
seems I need to use logback appenders, so this microutils should work for that?
c

Czar

01/25/2019, 3:37 PM
yup, it's just kotlin sugar around slf4j, so it will definitely work for you. In fact I have that setup in our applications at work.
s

serebit

01/25/2019, 4:00 PM
I’m working on a standalone logger at https://gitlab.com/serebit/logkat, but the syntax is going to change significantly with the next update
d

Dalinar

01/25/2019, 4:26 PM
I'm not entirely sure if I want to use logback or log4j2, however - I want to get started on this soon - so it's pretty easy to switch between them later if I need to right?
c

Czar

01/25/2019, 4:53 PM
yes, if you don't use them directly but a universal API, like Slf4J. But at this point discussion becomes off-topic 🙂