diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec
index 62872c283c..b142e08c5f 100644
--- a/build/NuSpecs/UmbracoCms.Core.nuspec
+++ b/build/NuSpecs/UmbracoCms.Core.nuspec
@@ -33,8 +33,6 @@
-
-
@@ -53,6 +51,13 @@
+
+
+
+
+
+
+
diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec
index 9811743746..1deec235f8 100644
--- a/build/NuSpecs/UmbracoCms.nuspec
+++ b/build/NuSpecs/UmbracoCms.nuspec
@@ -22,7 +22,7 @@
not want this to happen as the alpha of the next major is, really, the next major already.
-->
-
+
@@ -35,7 +35,6 @@
-
diff --git a/build/NuSpecs/tools/install.core.ps1 b/build/NuSpecs/tools/install.core.ps1
index ad3a00651b..0a658266a1 100644
--- a/build/NuSpecs/tools/install.core.ps1
+++ b/build/NuSpecs/tools/install.core.ps1
@@ -33,7 +33,6 @@ if ($project) {
robocopy $umbracoBinFolder $umbracoBinBackupPath /e /LOG:$copyLogsPath\UmbracoBinBackup.log
# Delete files Umbraco ships with
- if(Test-Path $umbracoBinFolder\log4net.dll) { Remove-Item $umbracoBinFolder\log4net.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\Microsoft.ApplicationBlocks.Data.dll) { Remove-Item $umbracoBinFolder\Microsoft.ApplicationBlocks.Data.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\System.Data.SqlServerCe.dll) { Remove-Item $umbracoBinFolder\System.Data.SqlServerCe.dll -Force -Confirm:$false }
if(Test-Path $umbracoBinFolder\System.Data.SqlServerCe.Entity.dll) { Remove-Item $umbracoBinFolder\System.Data.SqlServerCe.Entity.dll -Force -Confirm:$false }
diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs
index 77bd21b673..e6118de937 100644
--- a/src/SolutionInfo.cs
+++ b/src/SolutionInfo.cs
@@ -19,4 +19,4 @@ using System.Resources;
// these are FYI and changed automatically
[assembly: AssemblyFileVersion("8.0.0")]
-[assembly: AssemblyInformationalVersion("8.0.0-alpha.44")]
+[assembly: AssemblyInformationalVersion("8.0.0-alpha.49")]
diff --git a/src/Umbraco.Core/BindingRedirects.cs b/src/Umbraco.Core/BindingRedirects.cs
index a93485085e..17e187b7ae 100644
--- a/src/Umbraco.Core/BindingRedirects.cs
+++ b/src/Umbraco.Core/BindingRedirects.cs
@@ -18,10 +18,7 @@ namespace Umbraco.Core
// this only gets called when an assembly can't be resolved
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
}
-
- private static readonly Regex Log4NetAssemblyPattern = new Regex("log4net, Version=([\\d\\.]+?), Culture=neutral, PublicKeyToken=\\w+$", RegexOptions.Compiled);
- private const string Log4NetReplacement = "log4net, Version=2.0.8.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a";
-
+
///
/// This is used to do an assembly binding redirect via code - normally required due to signature changes in assemblies
///
@@ -30,12 +27,6 @@ namespace Umbraco.Core
///
private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
{
- //log4net:
- if (Log4NetAssemblyPattern.IsMatch(args.Name) && args.Name != Log4NetReplacement)
- {
- return Assembly.Load(Log4NetAssemblyPattern.Replace(args.Name, Log4NetReplacement));
- }
-
//AutoMapper:
// ensure the assembly is indeed AutoMapper and that the PublicKeyToken is null before trying to Load again
// do NOT just replace this with 'return Assembly', as it will cause an infinite loop -> stackoverflow
diff --git a/src/Umbraco.Core/Components/BootLoader.cs b/src/Umbraco.Core/Components/BootLoader.cs
index fd09ce839d..87d4cdac75 100644
--- a/src/Umbraco.Core/Components/BootLoader.cs
+++ b/src/Umbraco.Core/Components/BootLoader.cs
@@ -111,15 +111,15 @@ namespace Umbraco.Core.Components
catch (Exception e)
{
// in case of an error, force-dump everything to log
- _logger.Info(() => GetComponentsReport(requirements));
- _logger.Error("Failed to sort components.", e);
+ _logger.Info("Component Report:\r\n{ComponentReport}", GetComponentsReport(requirements));
+ _logger.Error(e, "Failed to sort compontents.");
throw;
}
// bit verbose but should help for troubleshooting
var text = "Ordered Components: " + Environment.NewLine + string.Join(Environment.NewLine, sortedComponentTypes) + Environment.NewLine;
Console.WriteLine(text);
- _logger.Debug(text);
+ _logger.Debug("Ordered Components: {SortedComponentTypes}", sortedComponentTypes);
return sortedComponentTypes;
}
diff --git a/src/Umbraco.Core/Composing/TypeFinder.cs b/src/Umbraco.Core/Composing/TypeFinder.cs
index f244d1d1ce..a42b84e0c5 100644
--- a/src/Umbraco.Core/Composing/TypeFinder.cs
+++ b/src/Umbraco.Core/Composing/TypeFinder.cs
@@ -148,7 +148,7 @@ namespace Umbraco.Core.Composing
catch (FileNotFoundException ex)
{
//this will occur if it cannot load the assembly
- Current.Logger.Error(typeof(TypeFinder), "Could not load assembly App_Code", ex);
+ Current.Logger.Error(typeof(TypeFinder), ex, "Could not load assembly App_Code");
}
}
}
@@ -224,7 +224,6 @@ namespace Umbraco.Core.Composing
"Dynamic,",
"HtmlDiff,",
"Iesi.Collections,",
- "log4net,",
"Microsoft.",
"Newtonsoft.",
"NHibernate.",
@@ -440,7 +439,7 @@ namespace Umbraco.Core.Composing
}
catch (TypeLoadException ex)
{
- Current.Logger.Error(typeof(TypeFinder), $"Could not query types on {assembly} assembly, this is most likely due to this assembly not being compatible with the current Umbraco version", ex);
+ Current.Logger.Error(typeof(TypeFinder), ex, "Could not query types on {Assembly} assembly, this is most likely due to this assembly not being compatible with the current Umbraco version", assembly);
continue;
}
@@ -506,7 +505,7 @@ namespace Umbraco.Core.Composing
}
catch (TypeLoadException ex)
{
- Current.Logger.Error(typeof(TypeFinder), $"Could not query types on {assembly} assembly, this is most likely due to this assembly not being compatible with the current Umbraco version", ex);
+ Current.Logger.Error(typeof(TypeFinder), ex, "Could not query types on {Assembly} assembly, this is most likely due to this assembly not being compatible with the current Umbraco version", assembly);
continue;
}
@@ -573,7 +572,7 @@ namespace Umbraco.Core.Composing
if (NotifiedLoadExceptionAssemblies.Contains(a.FullName) == false)
{
NotifiedLoadExceptionAssemblies.Add(a.FullName);
- Current.Logger.Warn(typeof (TypeFinder), ex, $"Could not load all types from {a.GetName().Name}.");
+ Current.Logger.Warn(typeof (TypeFinder), ex, "Could not load all types from {TypeName}.", a.GetName().Name);
}
}
return rex.Types.WhereNotNull().ToArray();
diff --git a/src/Umbraco.Core/Composing/TypeLoader.cs b/src/Umbraco.Core/Composing/TypeLoader.cs
index d87fdfe3de..304638e017 100644
--- a/src/Umbraco.Core/Composing/TypeLoader.cs
+++ b/src/Umbraco.Core/Composing/TypeLoader.cs
@@ -494,7 +494,7 @@ namespace Umbraco.Core.Composing
if (--attempts == 0)
throw;
- _logger.Logger.Debug(() => $"Attempted to get filestream for file {path} failed, {attempts} attempts left, pausing for {pauseMilliseconds} milliseconds");
+ _logger.Logger.Debug("Attempted to get filestream for file {Path} failed, {NumberOfAttempts} attempts left, pausing for {PauseMilliseconds} milliseconds", path, attempts, pauseMilliseconds);
Thread.Sleep(pauseMilliseconds);
}
}
@@ -645,7 +645,7 @@ namespace Umbraco.Core.Composing
if (typeList != null)
{
// need to put some logging here to try to figure out why this is happening: http://issues.umbraco.org/issue/U4-3505
- _logger.Logger.Debug(() => $"Getting {GetName(baseType, attributeType)}: found a cached type list.");
+ _logger.Logger.Debug("Getting {TypeName}: found a cached type list.", GetName(baseType, attributeType));
return typeList.Types;
}
@@ -676,7 +676,7 @@ namespace Umbraco.Core.Composing
// so in this instance there will never be a result.
if (cacheResult.Exception is CachedTypeNotFoundInFileException || cacheResult.Success == false)
{
- _logger.Logger.Debug(() => $"Getting {GetName(baseType, attributeType)}: failed to load from cache file, must scan assemblies.");
+ _logger.Logger.Debug("Getting {TypeName}: failed to load from cache file, must scan assemblies.", GetName(baseType, attributeType));
scan = true;
}
else
@@ -695,7 +695,7 @@ namespace Umbraco.Core.Composing
catch (Exception ex)
{
// in case of any exception, we have to exit, and revert to scanning
- _logger.Logger.Error("Getting " + GetName(baseType, attributeType) + ": failed to load cache file type " + type + ", reverting to scanning assemblies.", ex);
+ _logger.Logger.Error(ex, "Getting {TypeName}: failed to load cache file type {CacheType}, reverting to scanning assemblies.", GetName(baseType, attributeType), type);
scan = true;
break;
}
@@ -703,7 +703,7 @@ namespace Umbraco.Core.Composing
if (scan == false)
{
- _logger.Logger.Debug(() => $"Getting {GetName(baseType, attributeType)}: loaded types from cache file.");
+ _logger.Logger.Debug("Getting {TypeName}: loaded types from cache file.", GetName(baseType, attributeType));
}
}
}
@@ -711,7 +711,7 @@ namespace Umbraco.Core.Composing
if (scan)
{
// either we had to scan, or we could not get the types from the cache file - scan now
- _logger.Logger.Debug(() => $"Getting {GetName(baseType, attributeType)}: scanning assemblies.");
+ _logger.Logger.Debug("Getting {TypeName}: scanning assemblies.", GetName(baseType, attributeType));
foreach (var t in finder())
typeList.Add(t);
@@ -729,11 +729,11 @@ namespace Umbraco.Core.Composing
UpdateCache();
}
- _logger.Logger.Debug(() => $"Got {GetName(baseType, attributeType)}, caching ({added.ToString().ToLowerInvariant()}).");
+ _logger.Logger.Debug("Got {TypeName}, caching ({CacheType}).", GetName(baseType, attributeType), added.ToString().ToLowerInvariant());
}
else
{
- _logger.Logger.Debug(() => $"Got {GetName(baseType, attributeType)}.");
+ _logger.Logger.Debug("Got {TypeName}.", GetName(baseType, attributeType));
}
return typeList.Types;
diff --git a/src/Umbraco.Core/Configuration/ClientDependencyConfiguration.cs b/src/Umbraco.Core/Configuration/ClientDependencyConfiguration.cs
index 41076e5d91..61f9023167 100644
--- a/src/Umbraco.Core/Configuration/ClientDependencyConfiguration.cs
+++ b/src/Umbraco.Core/Configuration/ClientDependencyConfiguration.cs
@@ -79,13 +79,13 @@ namespace Umbraco.Core.Configuration
versionAttribute.SetValue(newVersion);
clientDependencyConfigXml.Save(_fileName, SaveOptions.DisableFormatting);
- _logger.Info(() => $"Updated version number from {oldVersion} to {newVersion}");
+ _logger.Info("Updated version number from {OldVersion} to {NewVersion}", oldVersion, newVersion);
return true;
}
}
catch (Exception ex)
{
- _logger.Error("Couldn't update ClientDependency version number", ex);
+ _logger.Error(ex, "Couldn't update ClientDependency version number");
}
return false;
@@ -113,13 +113,13 @@ namespace Umbraco.Core.Configuration
versionAttribute.SetValue(newVersion);
clientDependencyConfigXml.Save(_fileName, SaveOptions.DisableFormatting);
- _logger.Info(() => $"Updated version number from {oldVersion} to {newVersion}");
+ _logger.Info("Updated version number from {OldVersion} to {NewVersion}", oldVersion, newVersion);
return true;
}
}
catch (Exception ex)
{
- _logger.Error("Couldn't update ClientDependency version number", ex);
+ _logger.Error(ex, "Couldn't update ClientDependency version number");
}
return false;
@@ -150,7 +150,7 @@ namespace Umbraco.Core.Configuration
catch (Exception ex)
{
//invalid path format or something... try/catch to be safe
- _logger.Error("Could not get path from ClientDependency.config", ex);
+ _logger.Error(ex, "Could not get path from ClientDependency.config");
}
var success = true;
@@ -167,7 +167,7 @@ namespace Umbraco.Core.Configuration
catch (Exception ex)
{
// Something could be locking the directory or the was another error, making sure we don't break the upgrade installer
- _logger.Error("Could not clear temp files", ex);
+ _logger.Error(ex, "Could not clear temp files");
success = false;
}
}
diff --git a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs
index a0ca2da4ff..708c563d9d 100644
--- a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs
+++ b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs
@@ -40,13 +40,15 @@ namespace Umbraco.Core.Configuration.Grid
var gridConfig = Path.Combine(_configFolder.FullName, "grid.editors.config.js");
if (File.Exists(gridConfig))
{
+ var sourceString = File.ReadAllText(gridConfig);
+
try
{
- editors.AddRange(parser.ParseGridEditors(File.ReadAllText(gridConfig)));
+ editors.AddRange(parser.ParseGridEditors(sourceString));
}
catch (Exception ex)
{
- _logger.Error("Could not parse the contents of grid.editors.config.js into a JSON array", ex);
+ _logger.Error(ex, "Could not parse the contents of grid.editors.config.js into a JSON array '{Json}", sourceString);
}
}
diff --git a/src/Umbraco.Core/Configuration/UmbracoConfig.cs b/src/Umbraco.Core/Configuration/UmbracoConfig.cs
index 248736d0fe..6dd5617992 100644
--- a/src/Umbraco.Core/Configuration/UmbracoConfig.cs
+++ b/src/Umbraco.Core/Configuration/UmbracoConfig.cs
@@ -88,7 +88,7 @@ namespace Umbraco.Core.Configuration
if (_healthChecks == null)
{
var ex = new ConfigurationErrorsException("Could not load the " + typeof(IHealthChecks) + " from config file, ensure the web.config and healthchecks.config files are formatted correctly");
- Current.Logger.Error("Config error", ex);
+ Current.Logger.Error(ex, "Config error");
throw ex;
}
@@ -103,7 +103,7 @@ namespace Umbraco.Core.Configuration
if (_dashboardSection == null)
{
var ex = new ConfigurationErrorsException("Could not load the " + typeof(IDashboardSection) + " from config file, ensure the web.config and Dashboard.config files are formatted correctly");
- Current.Logger.Error("Config error", ex);
+ Current.Logger.Error(ex, "Config error");
throw ex;
}
@@ -162,7 +162,7 @@ namespace Umbraco.Core.Configuration
if (_umbracoSettings == null)
{
var ex = new ConfigurationErrorsException("Could not load the " + typeof (IUmbracoSettingsSection) + " from config file, ensure the web.config and umbracoSettings.config files are formatted correctly");
- Current.Logger.Error("Config error", ex);
+ Current.Logger.Error(ex, "Config error");
throw ex;
}
diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs
index 9c0ad4c7c4..8fb650510b 100644
--- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs
+++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs
@@ -22,7 +22,7 @@ namespace Umbraco.Core.Configuration
///
/// Gets the version comment of the executing code (eg "beta").
///
- public static string CurrentComment => "alpha.44";
+ public static string CurrentComment => "alpha.49";
///
/// Gets the assembly version of Umbraco.Code.dll.
diff --git a/src/Umbraco.Core/IO/MediaFileSystem.cs b/src/Umbraco.Core/IO/MediaFileSystem.cs
index 47f9f14423..4ecb44cfb9 100644
--- a/src/Umbraco.Core/IO/MediaFileSystem.cs
+++ b/src/Umbraco.Core/IO/MediaFileSystem.cs
@@ -102,7 +102,7 @@ namespace Umbraco.Core.IO
}
catch (Exception e)
{
- Logger.Error("Failed to delete attached file \"" + file + "\".", e);
+ Logger.Error(e, "Failed to delete attached file '{File}'", file);
}
});
}
diff --git a/src/Umbraco.Core/IO/PhysicalFileSystem.cs b/src/Umbraco.Core/IO/PhysicalFileSystem.cs
index bc9968153f..217ecb51b4 100644
--- a/src/Umbraco.Core/IO/PhysicalFileSystem.cs
+++ b/src/Umbraco.Core/IO/PhysicalFileSystem.cs
@@ -73,11 +73,11 @@ namespace Umbraco.Core.IO
}
catch (UnauthorizedAccessException ex)
{
- Current.Logger.Error("Not authorized to get directories", ex);
+ Current.Logger.Error(ex, "Not authorized to get directories for '{Path}'", fullPath);
}
catch (DirectoryNotFoundException ex)
{
- Current.Logger.Error("Directory not found", ex);
+ Current.Logger.Error(ex, "Directory not found for '{Path}'", fullPath);
}
return Enumerable.Empty();
@@ -109,7 +109,7 @@ namespace Umbraco.Core.IO
}
catch (DirectoryNotFoundException ex)
{
- Current.Logger.Error("Directory not found", ex);
+ Current.Logger.Error(ex, "Directory not found for '{Path}'", fullPath);
}
}
@@ -189,11 +189,11 @@ namespace Umbraco.Core.IO
}
catch (UnauthorizedAccessException ex)
{
- Current.Logger.Error("Not authorized to get directories", ex);
+ Current.Logger.Error(ex, "Not authorized to get directories for '{Path}'", fullPath);
}
catch (DirectoryNotFoundException ex)
{
- Current.Logger.Error("Directory not found", ex);
+ Current.Logger.Error(ex, "Directory not found for '{FullPath}'", fullPath);
}
return Enumerable.Empty();
@@ -226,7 +226,7 @@ namespace Umbraco.Core.IO
}
catch (FileNotFoundException ex)
{
- Current.Logger.Info(() => $"DeleteFile failed with FileNotFoundException: {ex.InnerException}");
+ Current.Logger.Error(ex.InnerException, "DeleteFile failed with FileNotFoundException for '{Path}'", fullPath);
}
}
diff --git a/src/Umbraco.Core/IO/ShadowFileSystems.cs b/src/Umbraco.Core/IO/ShadowFileSystems.cs
index c101b9a7c2..289667b0db 100644
--- a/src/Umbraco.Core/IO/ShadowFileSystems.cs
+++ b/src/Umbraco.Core/IO/ShadowFileSystems.cs
@@ -54,7 +54,7 @@ namespace Umbraco.Core.IO
}
_logger = logger;
- _logger.Debug(() => "Shadow " + id + ".");
+ _logger.Debug("Shadow '{ShadowId}'", id);
_id = id;
_wrappers = wrappers;
@@ -112,7 +112,7 @@ namespace Umbraco.Core.IO
{
lock (Locker)
{
- _logger.Debug(() => "UnShadow " + _id + " (" + (_completed ? "complete" : "abort") + ").");
+ _logger.Debug("UnShadow '{ShadowId}' {Status}", _id, _completed ? "complete" : "abort");
var exceptions = new List();
foreach (var wrapper in _wrappers)
diff --git a/src/Umbraco.Core/Logging/AppDomainTokenConverter.cs b/src/Umbraco.Core/Logging/AppDomainTokenConverter.cs
deleted file mode 100644
index 0abddc63e3..0000000000
--- a/src/Umbraco.Core/Logging/AppDomainTokenConverter.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Web;
-
-namespace Umbraco.Core.Logging
-{
- ///
- /// Allows for outputting a normalized appdomainappid token in a log format
- ///
- public sealed class AppDomainTokenConverter : log4net.Util.PatternConverter
- {
- protected override void Convert(TextWriter writer, object state)
- {
- writer.Write(HttpRuntime.AppDomainAppId.ReplaceNonAlphanumericChars(string.Empty));
- }
- }
-}
diff --git a/src/Umbraco.Core/Logging/AsyncForwardingAppenderBase.cs b/src/Umbraco.Core/Logging/AsyncForwardingAppenderBase.cs
deleted file mode 100644
index 3ebcfe458f..0000000000
--- a/src/Umbraco.Core/Logging/AsyncForwardingAppenderBase.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-using log4net.Appender;
-using log4net.Core;
-using log4net.Util;
-using System;
-using System.Runtime.Remoting.Messaging;
-
-namespace Umbraco.Core.Logging
-{
- ///
- /// Borrowed from https://github.com/cjbhaines/Log4Net.Async - will reference Nuget packages directly in v8
- ///
- public abstract class AsyncForwardingAppenderBase : ForwardingAppender
- {
- #region Private Members
-
- private const FixFlags DefaultFixFlags = FixFlags.Partial;
- private FixFlags fixFlags = DefaultFixFlags;
- private LoggingEventHelper loggingEventHelper;
-
- #endregion Private Members
-
- #region Properties
-
- public FixFlags Fix
- {
- get { return fixFlags; }
- set { SetFixFlags(value); }
- }
-
- ///
- /// Returns HttpContext.Current
- ///
- protected internal object HttpContext
- {
- get
- {
- return CallContext.HostContext;
- }
- set
- {
- CallContext.HostContext = value;
- }
- }
-
- ///
- /// The logger name that will be used for logging internal errors.
- ///
- protected abstract string InternalLoggerName { get; }
-
- public abstract int? BufferSize { get; set; }
-
- #endregion Properties
-
- public override void ActivateOptions()
- {
- base.ActivateOptions();
- loggingEventHelper = new LoggingEventHelper(InternalLoggerName, DefaultFixFlags);
- InitializeAppenders();
- }
-
- #region Appender Management
-
- public override void AddAppender(IAppender newAppender)
- {
- base.AddAppender(newAppender);
- SetAppenderFixFlags(newAppender);
- }
-
- private void SetFixFlags(FixFlags newFixFlags)
- {
- if (newFixFlags != fixFlags)
- {
- loggingEventHelper.Fix = newFixFlags;
- fixFlags = newFixFlags;
- InitializeAppenders();
- }
- }
-
- private void InitializeAppenders()
- {
- foreach (var appender in Appenders)
- {
- SetAppenderFixFlags(appender);
- }
- }
-
- private void SetAppenderFixFlags(IAppender appender)
- {
- var bufferingAppender = appender as BufferingAppenderSkeleton;
- if (bufferingAppender != null)
- {
- bufferingAppender.Fix = Fix;
- }
- }
-
- #endregion Appender Management
-
- #region Forwarding
-
- protected void ForwardInternalError(string message, Exception exception, Type thisType)
- {
- LogLog.Error(thisType, message, exception);
- var loggingEvent = loggingEventHelper.CreateLoggingEvent(Level.Error, message, exception);
- ForwardLoggingEvent(loggingEvent, thisType);
- }
-
- protected void ForwardLoggingEvent(LoggingEvent loggingEvent, Type thisType)
- {
- try
- {
- base.Append(loggingEvent);
- }
- catch (Exception exception)
- {
- LogLog.Error(thisType, "Unable to forward logging event", exception);
- }
- }
-
- #endregion Forwarding
- }
-}
diff --git a/src/Umbraco.Core/Logging/DebugDiagnosticsLogger.cs b/src/Umbraco.Core/Logging/DebugDiagnosticsLogger.cs
index 4bb7aeb464..a8ca9b6c31 100644
--- a/src/Umbraco.Core/Logging/DebugDiagnosticsLogger.cs
+++ b/src/Umbraco.Core/Logging/DebugDiagnosticsLogger.cs
@@ -1,5 +1,4 @@
using System;
-using System.Linq;
namespace Umbraco.Core.Logging
{
@@ -9,95 +8,107 @@ namespace Umbraco.Core.Logging
public class DebugDiagnosticsLogger : ILogger
{
///
- public void Error(Type reporting, string message, Exception exception = null)
+ public void Fatal(Type reporting, Exception exception, string message)
{
System.Diagnostics.Debug.WriteLine(message + Environment.NewLine + exception, reporting.FullName);
}
+ ///
+ public void Fatal(Type reporting, Exception exception)
+ {
+ System.Diagnostics.Debug.WriteLine(Environment.NewLine + exception, reporting.FullName);
+ }
+
+ ///
+ public void Fatal(Type reporting, string message)
+ {
+ System.Diagnostics.Debug.WriteLine(message);
+ }
+
+ ///
+ public void Fatal(Type reporting, Exception exception, string messageTemplate, params object[] args)
+ {
+ System.Diagnostics.Debug.WriteLine(string.Format(messageTemplate, args) + Environment.NewLine + exception, reporting.FullName);
+ }
+
+ ///
+ public void Fatal(Type reporting, string messageTemplate, params object[] args)
+ {
+ System.Diagnostics.Debug.WriteLine(messageTemplate, args);
+ }
+
+ ///
+ public void Error(Type reporting, Exception exception, string message)
+ {
+ System.Diagnostics.Debug.WriteLine(message + Environment.NewLine + exception, reporting.FullName);
+ }
+
+ ///
+ public void Error(Type reporting, Exception exception)
+ {
+ System.Diagnostics.Debug.WriteLine(Environment.NewLine + exception, reporting.FullName);
+ }
+
+ ///
+ public void Error(Type reporting, string message)
+ {
+ System.Diagnostics.Debug.WriteLine(message);
+ }
+
+ ///
+ public void Error(Type reporting, Exception exception, string messageTemplate, params object[] args)
+ {
+ System.Diagnostics.Debug.WriteLine(string.Format(messageTemplate, args) + Environment.NewLine + exception, reporting.FullName);
+ }
+
+ ///
+ public void Error(Type reporting, string messageTemplate, params object[] args)
+ {
+ System.Diagnostics.Debug.WriteLine(messageTemplate, args);
+ }
+
///
public void Warn(Type reporting, string format)
{
System.Diagnostics.Debug.WriteLine(format, reporting.FullName);
}
-
- ///
- public void Warn(Type reporting, Func messageBuilder)
- {
- System.Diagnostics.Debug.WriteLine(messageBuilder(), reporting.FullName);
- }
-
+
///
public void Warn(Type reporting, string format, params object[] args)
{
System.Diagnostics.Debug.WriteLine(string.Format(format, args), reporting.FullName);
}
- ///
- public void Warn(Type reporting, string format, params Func