You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michael Brennan <Mi...@Allegis.com> on 2000/09/07 04:06:53 UTC

Bug in ServletContext.log implementation

I'm having an issue with the ServletContext.log(String msg, Throwable
throwable) method. According to the API documentation, this is supposed to
write the msg and the stack trace from throwable to the servlet log. In
fact, I am only getting the msg getting written to the log file. If msg
happens to be null, nothing gets written.

I know there are simple workarounds. I'm just noting that the behavior is
not conforming to the API docs, so I'm wondering if I'm missing something or
should this be noted as a bug?

Thanks.



Re: Bug in ServletContext.log implementation

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Michael Brennan wrote:

> I'm having an issue with the ServletContext.log(String msg, Throwable
> throwable) method. According to the API documentation, this is supposed to
> write the msg and the stack trace from throwable to the servlet log. In
> fact, I am only getting the msg getting written to the log file. If msg
> happens to be null, nothing gets written.
>
> I know there are simple workarounds. I'm just noting that the behavior is
> not conforming to the API docs, so I'm wondering if I'm missing something or
> should this be noted as a bug?
>

There was a bug in old (3.0? 3.1?) versions of Tomcat, but I know this works
correctly in the current version.

>
> Thanks.

Craig McClanahan

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat