• 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
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

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
 
And will you succeed? Yes you will indeed! (98 and 3/4 % guaranteed) - Seuss. tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic