You only need to call Configure() once and not every time you log
something.




Regards
Mirzas

-----Original Message-----
From: Thomasabcd [mailto:[EMAIL PROTECTED] 
Sent: 5. oktober 2006 13:55
To: [email protected]
Subject: Logging is delayed


I am new to log4net and setting up log4net, and am experiencing some
problems when logging to a SQL Server 2005 DB.

I have created a button with the following event to test:

protected void Button1_Click(object sender, EventArgs e) {
log4net.Config.XmlConfigurator.Configure();
log.Info("Hi..Test Log Message at "
+DateTime.Now.ToString());
}

When I press the button for the first time, nothing happens in the DB.
When I press the button for the second time, the first exception is
logged but the second is not. When I then press the button for the third
time, the second exception is logged but the third is not. I have done
this many times now, and it is always the same. The current exception is
not logged until I press the button again, but then the new exception is
not logged. 

Any ideas?
--
View this message in context:
http://www.nabble.com/Logging-is-delayed-tf2387979.html#a6657142
Sent from the Log4net - Users mailing list archive at Nabble.com.

Reply via email to