Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDK1.4- Java.util.logging package

 
Anand Shivadas
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • 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 ]
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic