• 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 troubles

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have some troubles using the Logger class to display different kind of messages ...

In a first test I tried this snippet :


I obtained (only) the following result :

Jan 7, 2009 11:07:55 PM api.DataTest testLogger1
INFO: Info message
Jan 7, 2009 11:07:55 PM api.DataTest testLogger1
SEVERE: null



Then, I searched through olds topics and found a post from A. Monkhouse Changing log level
From this example, I wrote the second snippet :


This time, I got this :

Jan 7, 2009 11:09:10 PM DataTest testLogger
FINER: ENTRY 10
Jan 7, 2009 11:09:10 PM api.DataTest testLogger2
INFO: Info message
Jan 7, 2009 11:09:10 PM api.DataTest testLogger2
INFO: Info message
Jan 7, 2009 11:09:10 PM api.DataTest testLogger2
SEVERE: null
Jan 7, 2009 11:09:10 PM api.DataTest testLogger2
SEVERE: null
Jan 7, 2009 11:09:10 PM api.DataTest testLogger2
FINE: This is a fine message
Jan 7, 2009 11:09:10 PM DataTest testLogger
FINER: RETURN 20



So this time, there are the expected messages + the messages I got with the first snippet

Does anybody could tell me how to correctly use that class without redundant or missing messages ?
 
reply
    Bookmark Topic Watch Topic
  • New Topic