You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Daniel Einspanjer <de...@gmail.com> on 2005/03/02 17:37:48 UTC

Re: NTEventLogAppender

When I had this problem, it turned out to be because
NTEventLogAppender only has the capability to log using an RPC call
and my server was locked down to not accept "remote" event logs.  I
fixed this by patching the 0.9.7 NTEventLogAppender to have better
error logging and to use the local API if the server was an empty
string.

Even if you are not logging to the local host, the error logging might
be beneficial to you for tracking your trouble down.

Attached is a patch for 0.9.7


On Tue, 1 Mar 2005 15:54:49 -0800, Ron Ohmer <ro...@aisconsulting.net> wrote:
> I too am having difficulties with this... 
>   
> Here is the my add appender code: 
>  
> 
> #ifdef WIN32 
> 
> NTEventLogAppender* ntlog=new NTEventLogAppender(); 
> 
> ntlog->setLog("Application"); 
> 
> ntlog->setServer("flormo04"); 
> 
> ntlog->setName("syslogappender"); 
> 
> ntlog->activateOptions(); 
> 
> CConfig::GetLogger()->addAppender(ntlog); 
> 
> #endif 
> 
> Where CConfig::GetLogger() is the logger... 
> 
> Do all the other types of loggers fine, but this one gives me: 
> 
> NT Event Log not opened.. 
> 
>   
> 
> I have tried it with out the set... Commands as well... 
> 
> Any advice? 
> 
> Thanks! 
> 
> Ron