DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24606>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24606

Possible enhancement: object keys in NDC.





------- Additional Comments From [EMAIL PROTECTED]  2003-11-11 14:43 -------
I was the user submitting the patch.

I recently replaced our website's dubious logging-mechanism with log4j.
In the course of doing so I stumbled upon the fact that the NDC only accepts
Strings as context information.

In the case of our web-application the context information is rather complex. 
It consists of all information necessary to answer a
http-request, which are :
- URL parameter
- POST parameter
- current Session state of the user
- an Access-History containing a short information about all requests  by that
user in the current session

To collect all this information and transform it into a string dump
is costly, especially if all this is only necessary if there's really
a log-entry with the current NDC.

The patch makes it possible to pass context information as Object 
and uses that Object's toString() to get the actual information.

The advantage is that you can push an Object-Reference and have it only
evaluated if there is really a call to NDC.get()

(If you replace NDC.pop() with NDC.popObject() which will not evaluate
 the context information to pop it :-) 

The modified version is compatible with existing client-side-code and
should be running at same speed. 
(Maybe a bit faster cause it saves one temporary String per NDC-level 
 and uses only one temporaryStringBuffer if the NDC.get() is called)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to