• 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

JDK1.4- Java.util.logging package

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All
I don't know it's right place to post this question. The following methods of java.util.logging.Logger class are not printing params to the handlers, just simply printing msg but not params to the handlers, ignoring params.
Any idea?
log(Level level, String msg, Object param1)
log(Level level, String msg, Object[] params)
Thanks,
Anand
SCJP2, SCJD2, SCWCD
[ March 17, 2003: Message edited by: Anand Shivadas ]
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's the code from SimpleFormatter (the default formatter):

As you can see it makes no reference to the getParameters method of the LogRecord. In other words, if you want to print it then you will have to write your own Formatter.
See this article for some info on writing your own Formatter.
http://www.javaranch.com/newsletter/May2002/newslettermay2002.jsp#logging
reply
    Bookmark Topic Watch Topic
  • New Topic