logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pavel Bazanov" <pa...@bazanov.net>
Subject Help me with dinamically setting up the RollingFileAppender please
Date Mon, 27 Oct 2008 10:16:56 GMT
Hello, 

 I have just downloaded the log4net and I can't use the RollingFileAppender. Check my code
please:

// ###################################################################

var appender = new log4net.Appender.RollingFileAppender();

appender.AppendToFile = true;

appender.File = "log.txt";

appender.MaxFileSize = 10000;

appender.MaxSizeRollBackups = 10;

appender.RollingStyle = log4net.Appender.RollingFileAppender.RollingMode.Size;

log4net.Config.BasicConfigurator.Configure(appender);

log.Info("event occurred");

// ###################################################################

No errors produced, but no log file is created, it just looks like nothing happens.

What am I doing wrong?

Thank you in advance.


Mime
View raw message