December 2017
Intermediate to advanced
260 pages
7h 34m
English
Ktor uses SLF4J (https://www.slf4j.org/) for logging by default. The following message is shown on running the application, if you don't add a logging provider:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".SLF4J: Defaulting to no-operation (NOP) logger implementationSLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
We can set up the logging provider to understand what is happening with the app by adding an additional Gradle dependency:
compile "ch.qos.logback:logback-classic:1.2.3"
Now, at least, we get good levels of logging information. But let's tweak them so they are more useful, in order to do that, we need to create a configuration file named logback.xml in the ...
Read now
Unlock full access