https://kotlinlang.org logo
#ktor
Title
# ktor
f

FunkyMuse

03/07/2023, 12:14 PM
hey guys, how do i disable these messages?
👀 1
g

Goetz Markgraf

03/07/2023, 12:43 PM
set Log level to higher than trace (e. g. debug or info)
f

FunkyMuse

03/07/2023, 12:43 PM
it’s set to Info and i see these messages, this happened after i upgraded to Ktor 2.X
c

CLOVIS

03/07/2023, 1:01 PM
How did you set it? You shouldn't see them with INFO.
f

FunkyMuse

03/07/2023, 1:02 PM
Copy code
<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{dd-MM-YYYY HH:mm:ss.SSS} [%thread] %X{call-id} %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>
    <root level="trace">
        <appender-ref ref="STDOUT"/>
    </root>
    <logger name="io.netty" level="INFO"/>
</configuration>
c

CLOVIS

03/07/2023, 1:03 PM
Copy code
root level="trace"
You have set it at TRACE, it's normal that you see the trace logs
If you want to remove the traces in Ktor but keep them for everything else, you can add
Copy code
<logger name="io.ktor.routing.Routing" level="INFO">
at the end of your file, it overrides the global level for a specific class (like you have done for io.netty)
🙏 1
🙌 1
f

FunkyMuse

03/07/2023, 1:11 PM
thank you so much @CLOVIS i just noticed that they added logging for nearly all plugins and this is the way forward to disable them
27 Views