udpates some logging stuff which will also make logging faster.

This commit is contained in:
Shannon
2015-07-08 17:55:08 +02:00
parent 1067b1e245
commit a277ac2fe4
2 changed files with 9 additions and 3 deletions

View File

@@ -66,7 +66,9 @@ namespace Umbraco.Core
InitializeProfilerResolver();
_timer = DisposableTimer.TraceDuration<CoreBootManager>("Umbraco application starting on '" + NetworkHelper.MachineName + "'", "Umbraco application startup complete");
_timer = DisposableTimer.TraceDuration<CoreBootManager>(
string.Format("Umbraco {0} application starting on {1}", UmbracoVersion.Current, NetworkHelper.MachineName),
"Umbraco application startup complete");
CreateApplicationCache();

View File

@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Web;
@@ -40,8 +41,11 @@ namespace Umbraco.Core.Logging
/// <returns></returns>
private static string PrefixThreadId(string generateMessageFormat)
{
return "[T" + Thread.CurrentThread.ManagedThreadId + "/D" + AppDomain.CurrentDomain.Id + "] " + generateMessageFormat;
}
return (_prefixThreadId ?? (_prefixThreadId = "[P" + Process.GetCurrentProcess().Id + "/T" + Thread.CurrentThread.ManagedThreadId + "/D" + AppDomain.CurrentDomain.Id + "] "))
+ generateMessageFormat;
}
private static string _prefixThreadId = null;
#region Error
/// <summary>