I have below code in global application error event. If there is any invalid url, this event gets fired. Is it required to log http 404 errors.
void Application_Error(object sender, System.EventArgs e)
{
Exception lastException = HttpContext.Current.Server.GetLastError();
//log exception
}
The question is quite general, but logging 404 pages is quite good for several reasons.
By logging 404 pages you can
find broken linkson your web site and also to see how frequent it happens, that way you can createredirectsif needed.But it’s your choice of course if you want to that or not.