My guess is that the account the appplication is running under does not have rights to create your xxx.log file or there is some other problem with that first bit of code and so that is causing an error, and therefore because you have no error handling in your Application_Error method it just falls out.
You could try just putting a redirect in the top of the method to some weird page and if it goes to your weird page you know it is definitely hitting the code then you just have to resolve why it is failing.
Could you include the below code in Global.asax
void Application_Error(object sender, EventArgs e)
{
Exception objErr = Server.GetLastError().GetBaseException();
Server.ClearError();
Server.Transfer("~/About.aspx");
}