On 2006-07-11, Mark Space <> wrote:
> lordy wrote:
>> If this is your own logging class
>> Create a logging method that takes a Throwable t and calls..
>>
>> t.printStackTrace(log.outputStream);
>
> Thanks, this is an interesting idea. Maybe a tad less generic that just
> making a String, but I might give this a try to see if I like it better.
>
>>
>> Or see throwable class for more..
>>
>> Better still use the appropiate method in a pre-written logging class.
>>
>> Eg. for java.util.logging.Logger class ..
>>
>> logger.log(Level.FINE,"IO Error",e);
>
> This uses the toString() method in the Throwable class, yes?
Nope

It is passed as a throwable to the logRecord and in turn to the
Handler.
http://java.sun.com/j2se/1.4.2/docs/...lang.Throwable)
"Note that the thrown argument is stored in the LogRecord thrown
property"
See also
http://java.sun.com/j2se/1.4.2/docs/...LogRecord.html
Lordy