|
Hello All, I have a custom appender (DLL) which can be used to create and send message to MSMQ. I want to use the same appender with different configuration file that means multiple appender scenarios. When I tried with multiple appender in configuration file like below it doesn’t work. It loads both appender but creates and sends message to only one MSMQ <appender name="MSMQ" class="MSMQAppenderDLL.MSMQAppenderDLL"> <param name="Path" value="drprabhakar-a0\\private$\\MSMQ" /> </appender>
<appender name="MSMQLive" class="MSMQAppenderDLL.MSMQAppenderDLL"> <param name="Path" value="drprabhakar-a0\\private$\\MSMQLive" /> </appender>
<root> <priority value ="debug" /> <appender-ref ref="MSMQ" /> <appender-ref ref="MSMQLive" />
When I tried with two different DLL to achieve the results it doesn’t work either. Sample code is below.
HMODULE hModule = LoadLibrary ( "MSMQAppenderDLL.dll" ); if (hModule==NULL) return; DOMConfigurator::configure(_T("MSMQConfigurationDll.xml")); String loggerName = _T("MSMQConfigurationDll"); LoggerPtr logger = Logger::getLogger(loggerName); logger->debug(_T("Custom Client debug message"));
HMODULE shModule = LoadLibrary ( "LIVEMSMQAppenderDLL.dll" ); if (shModule==NULL) return; DOMConfigurator::configure(_T("LIVEMSMQConfigurationDll.xml")); String LiveloggerName = _T("LIVEMSMQConfigurationDll"); LoggerPtr Livelogger = Logger::getLogger(LiveloggerName); Livelogger->debug(_T("Live Custom Client debug message"));
It crashes when it calls the DOMConfigurator.confiqure at the second time. First one it works. If I have them in a separate application it works flawlessly.
Would you please help me out to solve this.
PK |
Can i have multiple custom appenders loaded in my application? How?
Kadarkarai, Prabhakar \(Prabhakar\) 16 Feb 2005 05:44:16 -0000
- Re: Can i have multiple custom appende... Kadarkarai, Prabhakar \(Prabhakar\)
- Re: Can i have multiple custom ap... Curt Arnold
