I hit another roadblock. I'm trying to create an AsyncAppender with a
ConsoleAppender attached (programatically for now). Once I call
logger->addAppender(asyncAppender) I get an access violation exception:

"Unhandled exception at 0x0fd39f81 (log4cxx.dll) in ..."

My code looks like this:
defaultLayout = new log4cxx::SimpleLayout();
asyncAppender = new log4cxx::AsyncAppender();
consoleAppender = new log4cxx::ConsoleAppender(defaultLayout);
asyncAppender->addAppender(consoleAppender);
logger->addAppender(asyncAppender);   // crashes here


The exception occurs here in log4cxx:

void AsyncAppender::addRef() const {
    ObjectImpl::addRef();  // crashes here
}



Now I'm worried the work around instructions I used to compile log4cxx
under VS 2010 might have messed something up. It works if I just use the
ConsoleAppender.

Does anybody have any experience using the AsyncAppender? Am I missing a
step?

Thank you for any help. I'm probably going to have to punt using log4cxx
now.

Joe



On Tue, Mar 18, 2014 at 10:17 AM, Joseph Fradley <joe.frad...@fradeng.com>wrote:

> Hello,
>
> FWIW, this guy had the best HOW-TO to compile log4cxx on Windows using VS
> 2010.
>
>
> http://www.codeproject.com/Tips/492585/How-to-build-log4cxx-with-Visual-Studio-2010
>
> I'm going to be evaluating with my C/C++ app. Is there any known show
> stoppers that I should know about (under Windows with VS 2010)?
>
> Thank you,
> Joe
>
>
>

Reply via email to