aspose file tools*
The moose likes Java in General and the fly likes JDK1.4- Java.util.logging package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JDK1.4- Java.util.logging package" Watch "JDK1.4- Java.util.logging package" New topic
Author

JDK1.4- Java.util.logging package

Anand Shivadas
Greenhorn

Joined: Oct 17, 2000
Posts: 22
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

Joined: May 05, 2000
Posts: 13974
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


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDK1.4- Java.util.logging package
 
Similar Threads
Runaway Thread
Not so simple NPE
java.util.Logger creating multiple log files
Logging "FINEST" messages using java Logger
Reflection API - Method