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

  • Home
  • SEARCH
  • 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 7861973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:57:19+00:00 2026-06-02T22:57:19+00:00

In my Struts project I am using Loggers. I am running my WSAD server

  • 0

In my Struts project I am using Loggers. I am running my WSAD server in Debug Mode. Here the below condition is satisfying but it is not printing the log info in console.

if(count.intValue() > 1)
{
    if (log.isDebugEnabled())
        log.info("many");

    return mapping.findForward("many");
}

Here I set my Logger level to INFO.

  • 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-06-02T22:57:20+00:00Added an answer on June 2, 2026 at 10:57 pm

    A “lower” logging level includes all the “higher” levels:

    ERROR > WARN > INFO > DEBUG
    highest ------------ lowest
    

    That means for example that when you set the level to DEBUG, you’ll also get INFO, WARN and ERROR messages; if you set it to INFO, you’ll see ERROR, WARN and INFO but not DEBUG messages, etc.

    Look at these lines:

    if (log.isDebugEnabled())
        log.info("many");
    

    What is confusing here is that you test if the DEBUG level is active (with isDebugEnabled), but you actually log at the INFO level.

    So, what happens here if the level is set to:

    • DEBUG: You’ll see the message, because DEBUG includes INFO messages.
    • INFO: You will not see the message, because isDebugEnabled returns false when the level is set to anything higher than DEBUG. That means the statement inside the if is not executed and you don’t see the message.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a project using struts 2, spring 3 and hibernate, but
I am working in a struts project and there I am using Solr Server
I'm trying implement my project in Apache Struts 2 but I'm not very familiar
I'm trying to start a new struts 2 project using maven (struts2 blank archetype)
I am using My-eclipse and doing a struts project there is no syntax error
I am using hibernate, struts, extjs in my project. I have a Customer object
I have used java mail(com.sun.mail.smtp) from my struts project. Mail is sent successfully but
i have legacy j2ee project which is using struts 2 with spring. Now when
I am using Struts 2, JSP and JPA in my project. I have nearly
I'm writing a Java application using Struts 2, but now I'd like to make

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.