Q:

Server side error logging

I'm working on creating web application, which will host in IIS, which I plan to accept a lot of short time connections. Right now I'm working on error logging, and it turns out that it's not that clear how to do it. 
For example my back-end sql server went down and 1000 clients which try to get responses from server each 10 minutes, will flood in the event log of the server 60000 events in 1 hour. Can anyone share his experience on how not to flood the event log on the server?
The code is close to this:
RequestHandler :
try {
    SqlConnection con = new SqlConnection(...);
    cmd.CommandText = "SELECT TOP FROM Foo WHERE Bar = `"Some`"";
    con.Open();
    cmd.Connection = con;

    // convert data to instance
}
catch (SqlException ex)
{
    Logger.WriteErrorEvent(ex)
}
// convert instance to response and send it back.

Thanks,
Jenia.

A:

As in another post - the best solution is to use your own files for logging. And I recommend to use log4net for this. It will take a while to get started, but once you learn it you'll see how useful it is. It will allow you to set different logging levels so you can log only information you need at that time and change them on the fly.

