Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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 ?
 
This tiny ad is suggesting that maybe she should go play in traffic.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic