tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Mixon (qwest)" <rnmi...@qwest.net>
Subject RE: NPE in ActionForm where it is not be possible
Date Tue, 13 Jul 2004 22:27:54 GMT
Craig Berry <mailto:Craig.Berry@portblue.com> wrote:
>> From:	QM [mailto:qm300@brandxdev.net]
>>
>> 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/HomePage.do', user='jpsdorg', host='64.216.181.157'
  06:59:39,917  INFO [TP-Processor8] ActionFilter:413 - Handled  request
URI: '/stars/HomePage.do', user='jpsdorg', host='64.216.181.157'
  06:59:56,006  INFO [TP-Processor6] ActionFilter:173 - Handling request
URI: '/stars/config/PoStudentAction.do', user='jpsdorg',
host='64.216.181.157'

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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message