tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Mixon (qwest)" <>
Subject RE: NPE in ActionForm where it is not be possible
Date Tue, 13 Jul 2004 22:27:54 GMT
Craig Berry <> wrote:
>> From:	QM []
>> I notice, you define/initialize the instance variable "log" at its
>> declaration point.
>> Humor me: what happens if you initialize "log" in the ctor?
> Or for that matter, why not make the log member static?  There's no
> harm in one log instance being shared by multiple objects.

Craig, I am not making the member static because that would cause me to
lose track of what thread the message is comming from. E.G. currently my
logging containst the thread id, like follows:
  06:59:39,869  INFO [TP-Processor8] ActionFilter:173 - Handling request
URI: '/stars/', user='jpsdorg', host=''
  06:59:39,917  INFO [TP-Processor8] ActionFilter:413 - Handled  request
URI: '/stars/', user='jpsdorg', host=''
  06:59:56,006  INFO [TP-Processor6] ActionFilter:173 - Handling request
URI: '/stars/config/', user='jpsdorg',

Yeah, it makes the message that much longer, but lets me figure out
which messages belong to which requests.

Thanks - Richard

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message