I successfully implemented Failover in ADONetAppender. If ADONet fails then it will rollover to FileAppender \ EventViewerAppender. Here I attached the ADONetAppender class file as well.
But I FileAppender I’ll fail, I can’t able to get Logging Event in FileAppender class. Here I’ll explain what scenario I tried. I tried to write a log in a text file but the path I mentioned in the configuration file was wrong, so while writing the log it will search the path to open the file in the method (OpenFile) in FileAppender class file, so in the try catch block I implemented below codes as well,
public override void OpenFile(string filename, bool append,Encoding encoding)
m_stream = CreateStream(filename, append, FileShare.Read);
catch (Exception ex)
LoggingEvent events = new LoggingEvent;
//events = (LoggingEvent);
string message = "FileAppender failed to find the path";
// Pass the logging event on to the attached appenders if there are any
if (iAppenderAttachedImpl != null)
message += " and there is no appender-ref specified in the configuration for fail-over!";
Could you please advise me on this ASAP?