Any recommendations how to integrate `kotlin-loggi...
# server
q
Any recommendations how to integrate
kotlin-logging
with
ktor
? 😮
o
What kind of integration?
q
like set the logging provider to
kotlin-logging
as mentioned here: https://ktor.io/servers/logging.html#providers
or is there only the option to use logback atm?
o
kotlin-logging is a frontend or a wrapper for slf4j. It means you can configure slf4j as explained in the link. Add kotlin-logging dependency and use its api. That should work.
n
Slf4j should be sufficient for logging. Logback ends up being overkill, and its XML based configuration is a major step backwards.
o
Slf4j is a facade. You still need also logback or log4j when using it.
n
Forgot about Slf4j being a logging facade. Meant referring to Log4j instead.
k
Logback + SLF4J is the way to go...
👍 4
d
I would strongly suggest injecting a slf4j logger with your DI framework.