logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hein Meling <mel...@acm.org>
Subject Re: limitations of NDC
Date Thu, 15 Sep 2005 14:46:25 GMT

Not sure I fully grasp your scenario, but it sort of looks like a 
problem I had with a signature change with MDC in log4j v1.3alpha. Maybe 
you could add a comment to the bug report:


I expect that the above bug will be fixed before 1.3 is released.


Venkatray Kamath wrote:
> Hi,
> NDC has a limitation wherein you can only push/pop String objects. I have a
> requirement wherein I need to dump the Contextual info stack onto the log
> file only when an exception occurs. In order to fulfill this requirement and
> implement it efficiently, I would like to avoid expensive toString() calls
> which needs to be executed on contextual info objects before pushing onto
> NDC. Whereas, I would like to execute toString() on each object on the NDC
> stack only in case an exception is thrown in the code. (I use AOP to catch
> all exceptions at the base layer and dump the NDC stack onto log file)
> Is there a workaround for this? 
> Or are there any plans to enhance NDC to accommodate generic Object Types
> instead of just Strings.
> Would really appreciate your thoughts.
> Thanks & Regards,
> Venkat

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message