I'm currently using several loggers in an multi-threaded application. I
overloaded the Logger class and some of it's methods, but not callAppenders, and
i'm using and extended FileAppender and a simple ConsoleAppender.
I keep getting an Access Violation Exception in DatePatternConverter.
When it happens i have 2 FileAppenders (for different loggers and files) in the
same Converter.
My SLogger::forcedLog just tests some more conditions than the original
forcedLog and my SFileAppender::subAppend just removes some forbidden chars from
the log message:
void SFileAppender::subAppend(const LoggingEventPtr& event, Pool& p)
{
LogString theMessage = event->getMessage();
for (LogString::iterator it = theMessage.begin(); it != theMessage.end(); it++)
{
if (forbiddenChars.find((*it))!=LogString::npos) (*it) = ' ';
}
FileAppender::subAppend(new SpotsLoggingEvent(event->getLogger(),
event->getLevel(), theMessage, event->getLocationInformation()),p);
}
Oh, and i'm using STL_port
|