Ensures log4net is shutdown on app shutdown

This commit is contained in:
Shannon
2015-07-07 16:12:05 +02:00
parent 1ffde1e9a6
commit 253b9dab27

View File

@@ -2,6 +2,7 @@
using System.Linq;
using System.Web;
using System.Web.Hosting;
using log4net;
using Umbraco.Core.Logging;
using Umbraco.Core.ObjectResolution;
@@ -31,7 +32,6 @@ namespace Umbraco.Core
/// </summary>
internal void StartApplication(object sender, EventArgs e)
{
//boot up the application
GetBootManager()
.Initialize()
@@ -139,6 +139,9 @@ namespace Umbraco.Core
Logger.Info<UmbracoApplicationBase>("Application shutdown. Reason: " + HostingEnvironment.ShutdownReason);
}
OnApplicationEnd(sender, e);
//Last thing to do is shutdown log4net
LogManager.Shutdown();
}
protected abstract IBootManager GetBootManager();