You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Sridhar S <sr...@gmail.com> on 2004/09/13 16:59:58 UTC

Problems with using BufferingForwardingAppender with ISAPI Filter

All,
I am trying to use the BufferingFowardingAppender with my ISAPI
filter. Everything is done programmatically. I do a
BasicConfigurator.Configure(), create a RollingFileAppender. The RFA
is asociated with a BFA (BufferSize=1). This is associated with the
logger and activated.

When I log using this config (log done with a FATAL level), the log
files get created but nothing gets appended in logfile.

With the same code, if I comment out the BFA and log directly to RFA,
it works fine. Which raises the question, does BFA have problems with
ISAPI filter?

I am appending the code that I am using to create the appenders below:

                RollingFileAppender* rfa = new RollingFileAppender();
	rfa->set_AppendToFile(true);
	rfa->set_File("C:\\Program Files\\Infravio\\Windows\\log\\myownlog.log");
	rfa->set_Layout(new PatternLayout("%m%n"));
	rfa->set_MaximumFileSize("10MB");
	rfa->set_Name("TestAppender");
	rfa->ActivateOptions();

	BufferingForwardingAppender* bfa = new BufferingForwardingAppender();
	bfa->AddAppender(rfa);
	bfa->set_Layout(new PatternLayout("%m%n"));
	bfa->set_BufferSize(1);
	bfa->set_Lossy(false);
	bfa->ActivateOptions();

Environment:
WinXP SP1
IIS 5.1
Log4Net 120 Beta 8
VC++ 7.0

Any ideas on how to solve this issue would be greatly appreciated.

Thanks,
Sridhar.