Updated logging and instrumentation

This commit is contained in:
Keivan 2010-10-15 00:10:44 -07:00
commit c597363bf8
20 changed files with 579 additions and 256 deletions

View file

@ -1,10 +1,13 @@
using System.Web.Mvc;
using System;
using System.Diagnostics;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Ninject;
using Ninject.Web.Mvc;
using NLog;
using NzbDrone.Core;
namespace NzbDrone.Web
{
public class MvcApplication : NinjectHttpApplication
@ -21,12 +24,11 @@ namespace NzbDrone.Web
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Series", action = "Index", id = UrlParameter.Optional } // Parameter defaults
);
}
protected override void OnApplicationStarted()
{
CentralDispatch.ConfigureNlog();
Instrumentation.Setup();
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
base.OnApplicationStarted();
@ -35,9 +37,15 @@ namespace NzbDrone.Web
protected override IKernel CreateKernel()
{
return CentralDispatch.NinjectKernel;
}
// ReSharper disable InconsistentNaming
protected void Application_Error(object sender, EventArgs e)
{
Instrumentation.LogEpicException(Server.GetLastError());
}
}
}