Is there a best practice for enabling debug loggin...
# ktor
d
Is there a best practice for enabling debug logging level in Ktor for debug environments?
do you mean for debug environments only
?
d
yes
I use Docker, so it's preferable to have it configurable via ENV VAR
d
I guess you can use
<!-- if
inside logback, and then use environment variables like described here: https://ktor.io/servers/configuration/environments.html
d
Thanks, I'll look into it...
­čĹŹ 1
If I'm using
org.kurento:kurento-jsonrpc-client:6.6.0
, I just have to add
<logger name="org.kurento" level="DEBUG"/>
? It doesn't seem to be giving any logs...?
Is there a simpler way to just do this from code for all services in dev env..?
d
What about checking the env variable with the environment, and set the loglevel programmatically? https://stackoverflow.com/questions/9627358/how-to-change-logback-log-level-programmatically-in-java
d
Funny, it looks like the lib is ignoring Ktor logger root...? In spring, they have: https://github.com/Kurento/kurento-demos-java/blob/master/helloworld-safari/src/main/resources-filtered/application.properties, isn't that the equivalent of logback.xml?