From 6b2e042e767c25c644c96ae60c1a5d89fd27a091 Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 14 Jul 2015 10:49:43 +0200 Subject: [PATCH] updates LogHelper references --- src/Umbraco.Core/CoreBootManager.cs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Umbraco.Core/CoreBootManager.cs b/src/Umbraco.Core/CoreBootManager.cs index b51fa1e3b0..a6df98eef9 100644 --- a/src/Umbraco.Core/CoreBootManager.cs +++ b/src/Umbraco.Core/CoreBootManager.cs @@ -123,9 +123,9 @@ namespace Umbraco.Core InitializeModelMappers(); - using (DisposableTimer.DebugDuration( - () => string.Format("Executing {0} IApplicationEventHandler.OnApplicationInitialized", ApplicationEventsResolver.Current.ApplicationEventHandlers.Count()), - () => "Finished executing IApplicationEventHandler.OnApplicationInitialized")) + using (_profilingLogger.DebugDuration( + string.Format("Executing {0} IApplicationEventHandler.OnApplicationInitialized", ApplicationEventsResolver.Current.ApplicationEventHandlers.Count()), + "Finished executing IApplicationEventHandler.OnApplicationInitialized")) { //now we need to call the initialize methods ApplicationEventsResolver.Current.ApplicationEventHandlers @@ -137,7 +137,7 @@ namespace Umbraco.Core } catch (Exception ex) { - LogHelper.Error("An error occurred running OnApplicationInitialized for handler " + x.GetType(), ex); + _profilingLogger.Logger.Error("An error occurred running OnApplicationInitialized for handler " + x.GetType(), ex); throw; } }); @@ -246,7 +246,7 @@ namespace Umbraco.Core /// Absolute protected virtual void InitializeApplicationRootPath(string rootPath) { - Umbraco.Core.IO.IOHelper.SetRootDirectory(rootPath); + IOHelper.SetRootDirectory(rootPath); } /// @@ -260,9 +260,9 @@ namespace Umbraco.Core if (_isStarted) throw new InvalidOperationException("The boot manager has already been initialized"); - using (DisposableTimer.DebugDuration( - () => string.Format("Executing {0} IApplicationEventHandler.OnApplicationStarting", ApplicationEventsResolver.Current.ApplicationEventHandlers.Count()), - () => "Finished executing IApplicationEventHandler.OnApplicationStarting")) + using (_profilingLogger.DebugDuration( + string.Format("Executing {0} IApplicationEventHandler.OnApplicationStarting", ApplicationEventsResolver.Current.ApplicationEventHandlers.Count()), + "Finished executing IApplicationEventHandler.OnApplicationStarting")) { //call OnApplicationStarting of each application events handler ApplicationEventsResolver.Current.ApplicationEventHandlers @@ -274,7 +274,7 @@ namespace Umbraco.Core } catch (Exception ex) { - LogHelper.Error("An error occurred running OnApplicationStarting for handler " + x.GetType(), ex); + _profilingLogger.Logger.Error("An error occurred running OnApplicationStarting for handler " + x.GetType(), ex); throw; } }); @@ -305,9 +305,9 @@ namespace Umbraco.Core //Here we need to make sure the db can be connected to EnsureDatabaseConnection(); - using (DisposableTimer.DebugDuration( - () => string.Format("Executing {0} IApplicationEventHandler.OnApplicationStarted", ApplicationEventsResolver.Current.ApplicationEventHandlers.Count()), - () => "Finished executing IApplicationEventHandler.OnApplicationStarted")) + using (_profilingLogger.DebugDuration( + string.Format("Executing {0} IApplicationEventHandler.OnApplicationStarted", ApplicationEventsResolver.Current.ApplicationEventHandlers.Count()), + "Finished executing IApplicationEventHandler.OnApplicationStarted")) { //call OnApplicationStarting of each application events handler ApplicationEventsResolver.Current.ApplicationEventHandlers @@ -319,7 +319,7 @@ namespace Umbraco.Core } catch (Exception ex) { - LogHelper.Error("An error occurred running OnApplicationStarted for handler " + x.GetType(), ex); + _profilingLogger.Logger.Error("An error occurred running OnApplicationStarted for handler " + x.GetType(), ex); throw; } });