• 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

Logging (java.util.logging)

 
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Given the following code:

I run the above program with this command:

and get this result:

The output does not match my expectations; for I would
have though to also see the following lines:

Am I using the logging facility incorrectly?
{I'm running Java 1.4 on Mac OS X; I do not use
any configuration files or anything that is not
already shown above}.
Thanks,
Javini Javono
[ May 08, 2004: Message edited by: Javini Javono ]
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Javini,

Am I using the logging facility incorrectly?


Not at all. Except that the logging Handlers have their own level too. Your default handler (a ConsoleHandler) has its level set to INFO by default, meaning that while your Logger effectively logs messages at the finest level, your handler only "handles" those which have a level of INFO or above.
Regards,
Phil.
 
Javini Javono
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for your hint Phil. I'll search for a software solution
to get all the levels to print to the console.
Thanks,
Javini Javono
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Javini,
If you didn't set up other handlers, you probably can (I write this from memory) set the level of your default ConsoleHandler to FINEST by calling:

Anyway, if that line didn't work as excepted, you got the idea.
Regards,
Phil.
 
Javini Javono
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks much Phil. I was hoping for a software solution not using
configuration files; here is the first attempt:

With these results:

Thanks
Javini Javono
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic