Merge branch 'U4-8588' of https://github.com/JimBobSquarePants/Umbraco-CMS into JimBobSquarePants-U4-8588
# Conflicts: # build/NuSpecs/UmbracoCms.Core.nuspec # src/Umbraco.Web.UI/packages.config
This commit is contained in:
@@ -32,8 +32,8 @@
|
||||
<dependency id="AutoMapper" version="[3.0.0, 3.1.0)" />
|
||||
<dependency id="Newtonsoft.Json" version="[6.0.8, 9.0.0)" />
|
||||
<dependency id="Examine" version="[0.1.69-beta, 1.0.0)" />
|
||||
<dependency id="ImageProcessor" version="[2.3.3, 3.0.0)" />
|
||||
<dependency id="ImageProcessor.Web" version="[4.5.3, 5.0.0)" />
|
||||
<dependency id="ImageProcessor" version="[2.4.1, 3.0.0)" />
|
||||
<dependency id="ImageProcessor.Web" version="[4.6.1, 5.0.0)" />
|
||||
<dependency id="semver" version="[1.1.2, 2.0.0)" />
|
||||
<dependency id="UrlRewritingNet" version="[2.0.7, 3.0.0)" />
|
||||
<dependency id="Markdown" version="[1.14.4, 2.0.0)" />
|
||||
|
||||
46
src/Umbraco.Core/Logging/ImageProcessorLogger.cs
Normal file
46
src/Umbraco.Core/Logging/ImageProcessorLogger.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
namespace Umbraco.Core.Logging
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
using ImageProcessor.Common.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// A logger for explicitly logging ImageProcessor exceptions.
|
||||
/// <remarks>
|
||||
/// Creating this logger is enough for ImageProcessor to find and replace its in-built debug logger
|
||||
/// without any additional configuration required. This class currently has to be public in order
|
||||
/// to do so.
|
||||
/// </remarks>
|
||||
/// </summary>
|
||||
public sealed class ImageProcessorLogger : ImageProcessor.Common.Exceptions.ILogger
|
||||
{
|
||||
/// <summary>
|
||||
/// Logs the specified message as an error.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type calling the logger.</typeparam>
|
||||
/// <param name="text">The message to log.</param>
|
||||
/// <param name="callerName">The property or method name calling the log.</param>
|
||||
/// <param name="lineNumber">The line number where the method is called.</param>
|
||||
public void Log<T>(string text, [CallerMemberName] string callerName = null, [CallerLineNumber] int lineNumber = 0)
|
||||
{
|
||||
// Using LogHelper since the ImageProcessor logger expects a parameterless constructor.
|
||||
var message = string.Format("{0} {1} : {2}", callerName, lineNumber, text);
|
||||
LogHelper.Error<T>(string.Empty, new ImageProcessingException(message));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs the specified message as an error.
|
||||
/// </summary>
|
||||
/// <param name="type">The type calling the logger.</param>
|
||||
/// <param name="text">The message to log.</param>
|
||||
/// <param name="callerName">The property or method name calling the log.</param>
|
||||
/// <param name="lineNumber">The line number where the method is called.</param>
|
||||
public void Log(Type type, string text, [CallerMemberName] string callerName = null, [CallerLineNumber] int lineNumber = 0)
|
||||
{
|
||||
// Using LogHelper since the ImageProcessor logger expects a parameterless constructor.
|
||||
var message = string.Format("{0} {1} : {2}", callerName, lineNumber, text);
|
||||
LogHelper.Error(type, string.Empty, new ImageProcessingException(message));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,10 @@
|
||||
<Reference Include="ICSharpCode.SharpZipLib">
|
||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ImageProcessor, Version=2.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageProcessor.2.4.1.0\lib\net45\ImageProcessor.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.11.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\log4net-mediumtrust.2.0.0\lib\log4net.dll</HintPath>
|
||||
@@ -353,6 +357,7 @@
|
||||
<Compile Include="IDisposeOnRequestEnd.cs" />
|
||||
<Compile Include="Logging\AsyncForwardingAppenderBase.cs" />
|
||||
<Compile Include="Logging\IQueue.cs" />
|
||||
<Compile Include="Logging\ImageProcessorLogger.cs" />
|
||||
<Compile Include="Logging\LoggingEventContext.cs" />
|
||||
<Compile Include="Logging\LoggingEventHelper.cs" />
|
||||
<Compile Include="Logging\RingBuffer.cs" />
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<packages>
|
||||
<package id="AutoMapper" version="3.0.0" targetFramework="net45" />
|
||||
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net45" />
|
||||
<package id="ImageProcessor" version="2.4.1.0" targetFramework="net45" />
|
||||
<package id="log4net-mediumtrust" version="2.0.0" targetFramework="net4" />
|
||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net45" />
|
||||
|
||||
@@ -136,12 +136,12 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ImageProcessor, Version=2.3.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageProcessor.2.3.3.0\lib\net45\ImageProcessor.dll</HintPath>
|
||||
<Reference Include="ImageProcessor, Version=2.4.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageProcessor.2.4.1.0\lib\net45\ImageProcessor.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ImageProcessor.Web, Version=4.5.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageProcessor.Web.4.5.3.0\lib\net45\ImageProcessor.Web.dll</HintPath>
|
||||
<Reference Include="ImageProcessor.Web, Version=4.6.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\ImageProcessor.Web.4.6.1.0\lib\net45\ImageProcessor.Web.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=1.2.11.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<package id="ClientDependency-Mvc5" version="1.8.0.0" targetFramework="net45" />
|
||||
<package id="dotless" version="1.4.1.0" targetFramework="net45" />
|
||||
<package id="Examine" version="0.1.69.0-beta" targetFramework="net45" />
|
||||
<package id="ImageProcessor" version="2.3.3.0" targetFramework="net45" />
|
||||
<package id="ImageProcessor.Web" version="4.5.3.0" targetFramework="net45" />
|
||||
<package id="ImageProcessor" version="2.4.1.0" targetFramework="net45" />
|
||||
<package id="ImageProcessor.Web" version="4.6.1.0" targetFramework="net45" />
|
||||
<package id="log4net-mediumtrust" version="2.0.0" targetFramework="net45" />
|
||||
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
|
||||
|
||||
Reference in New Issue
Block a user