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 3946700
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:09:52+00:00 2026-05-20T01:09:52+00:00

I set logging level to CONFIG, but don’t see messages written on CONFIG level.

  • 0

I set logging level to CONFIG, but don’t see messages written on CONFIG level. What I am missing?

Configuration:

Logger logger = java.util.logging.Logger.getLogger("xxx");
logger.setLevel(java.util.logging.Level.CONFIG);

Tests:

logger.log(java.util.logging.Level.SEVERE, "severe");
logger.log(java.util.logging.Level.WARNING, "warning");
logger.log(java.util.logging.Level.INFO, "info");
logger.log(java.util.logging.Level.CONFIG, "config");
logger.log(java.util.logging.Level.FINE, "fine");
logger.log(java.util.logging.Level.FINER, "finer");
logger.log(java.util.logging.Level.FINEST, "finest");

Output:

SEVERE: severe
WARNING: warning
INFO: 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-05-20T01:09:52+00:00Added an answer on May 20, 2026 at 1:09 am

    I typically use logback to implement logging, which seems a tad better documented. So I would recommend switching to that.

    But to answer your question, I think what is happening is that your Logger is configured correctly, but the Handler it’s sending its messages to isn’t. The default configuration probably attaches a handler with INFO level logging to the root logger.

    edit: I wrote a little test program to verify, you indeed need to set the level on the handler attached to the root logger. You can do so like this:

    for (Handler handler : Logger.getLogger("").getHandlers()) {
        handler.setLevel(Level.CONFIG);
    }
    logger.config("config");
    

    Gives as output:

    Feb 11, 2011 4:32:14 PM Test main
    CONFIG: config

    This sets the level for all handlers attached to this. Obviously a better choice would be writing your own options file and explicitly configuring your loggers. A quick google turned up this article on the subject.

    You could also try configuring with a properties file on your classpath that reads:

    java.util.logging.ConsoleHandler.level=CONFIG
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to set level logging to DEBUG in tomcat but in console
I have a python logger set up, using python's logging module. I want to
I recently switched out log4net logging from using config files to being set up
Though the logging level is set to INFO, and that at runtime the condition
I'm trying to set the logging level to DEBUG in an embedded Jetty instance.
Can we set the logging level only for RemoteLogHandler? <inherits name=com.google.gwt.logging.Logging /> <set-property name='gwt.logging.enabled'
I want to add logging or tracing to my C# application but I don't
In the configuration properties of my javax.mail.Session I have set mail.debug=true , but for
I am using java.util logging classes to create a rolling file appender. I want
Is anyone using Elmah to send exceptions via email? I've got Elmah logging set

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.