On Dec 22, 2005, at 7:59 AM, Andreas Fester wrote:

Hi,

the attached patch adds a missing constructor which
takes a wstring& to the NDC class.

If there are not objections, I will commit it.

Thanks,

        Andreas


+1

I had to look at this one for a while. new NDC() is prohibited in log4j. In log4cxx, it wraps up a push and a pop into the NDC object lifecycle. So these two fragments would do the same thing:

{
    log4cxx::NDC("some action");
    someAction();
}

{
   log4cxx::NDC::push("some action");
   someAction();
   log4cxx::NDC::pop();
}

Except the first will still pop the value from the NDC if there is an exception.

I thought I had built log4cxx where LogString was neither std::wstring or std::string. But apparently I hadn't, since that should have caught the mismatch.

Reply via email to