• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

I can't seem to set the log level on my package

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have a class that uses alot of other classes. All these other classes are littered with logging on low levels.

I would like to suppress all logging by setting the default level for the ConsoleHandler to WARNING. Then I want to set the logging level to FINE on my package and only my package. Is that possible?

My logging.properties looks like this (I have verified throught testing that this is the file used by the code):



As you can see, I only use a ConsoleHandler and I'm trying to set all logging to WARNING and then set the level to FINE on my package only.

The problem is that the level WARNING seems to apply on my package to. If I lower "java.util.logging.ConsoleHandler.level" to FINE, my logs are logged to the console but if I raise it to WARNING they are not.

Any suggestions? It seems to me that this should be simple but no matter what I've tried it hasn't worked

I would be thankful for your help.

Best regards,
Mattias
 
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic