Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3610302
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:44:07+00:00 2026-05-18T21:44:07+00:00

I am using Jetty 6.1.24 to develop a Web Service and my code uses

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:44:07+00:00Added an answer on May 18, 2026 at 9:44 pm

    I had the same issue after placing slf4j’s jar in {jetty}/lib/ext.
    I solved it by placing this logback.xml file in {jetty}/resources

    <configuration>
      <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
          <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level - %msg%n</pattern>
        </encoder>
      </appender>
      <root level="info">
        <appender-ref ref="STDOUT" />
      </root>
    </configuration>
    

    Note the ‘level=”info”‘.

    Explanation:
    In this configuration Jetty uses as Logger implementation Slf4jLog.
    Slf4jLog, in turn, delegates to Logback’s implementation.
    The logback.xml tells to logback the log level and to use STDOUT.
    From here the standard Jetty behavior is present, except you can configure logging levels via logback.xml
    As in the default configuration, you can use jetty-logging.xml if you want.
    Off course, you can bypass Jetty’s PrintStreams and use Logback’s Appenders.
    Here the flow in case you use jetty-logging.xml:

    SomeClass --> Slf4JLog --> ConsoleAppender--> STDOUT --> RolloverFileOutputStream
     (Jetty)      (Jetty)         (Logback)        (OS)           (Jetty)
    

    Revisions:
    Jetty 7.2.2
    slf4j 1.6.1
    Logback 0.9.26

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Jetty (version 6.1.22) to service a Java web application. I would like
I've got a Java web application (using Spring), deployed with Jetty. If I try
I have a (custom) embedded jetty launcher which I had been using to develop/test
I am running a Solr instance on Jetty and when I search using the
Using JDeveloper , I started developing a set of web pages for a project
I have been tasked to develop an interactive website using java & mysql: using
Using Jetty 7.0.2, I am unable to set a custom session cookie path. I
I'm using Jetty to test a webservice we have and I am trying to
I am using Jetty and Selenium to automate some unit tests from my Maven
I am using Jetty 7 with JBoss Seam and have 2 Java Mail Sessions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.