On 2012-05-22 16:41, Christopher Nagel wrote:
1. NDC should not auto-pop() until a functional boundary is reached - in other
words, IF branches should not cause pop() but new functions should.
I appreciate the scoped (RAII) behavior of the constructor based NDC push/pop,
as documented in the API docs under NDC Constructor & Destructor Documentation.
http://logging.apache.org/log4cxx/apidocs/classlog4cxx_1_1_n_d_c.html
If you don't want an if statement to push/pop, don't create new stack based
instances within the if scope. Instead consider using the static push and pop
methods. Eg:
if( some condition )
log4cxx::NDC::push(m_loggingContext);
http://wiki.apache.org/logging-log4cxx/NestedDiagnosticContexts
--
Jacob Anawalt
Gecko Software, Inc.
janaw...@geckosoftware.com
435-752-8026