I am using Jetty 6.1.24 to develop a Web Service and my code uses slf4j, as Jetty does, and logging is working fine. What I want to do though is get debug logging from my code but not from Jetty (it's too verbose), but I cannot stop it from logging debug info. There are system properties to set debug mode (-DDEBUG), but not to unset debug mode.
My logback log level is set by the start script by setting the system property 'loglevel' and this in turn sets it in my resources/logback.xml:
<configuration>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d [%thread] %level %logger - %m%n</Pattern>
</layout>
</appender>
<root level="${loglevel:-INFO}">
<appender-ref ref="CONSOLE"/>
</root>
</configuration>
Jetty is either always generating debug logs, which are then ignored by the logger if debug is not enabled, or else it's using logger.isDebugEnabled() to set it's debug mode. Does anyone have any ideas on how to get this working?