diff --git a/.github/ranger.yml b/.github/ranger.yml new file mode 100644 index 00000000..31ba6797 --- /dev/null +++ b/.github/ranger.yml @@ -0,0 +1,17 @@ +merges: + - action: delete_branch +# - action: tag +labels: + 'needs info': + action: close + delay: 7 days + comment: "Please add the requested info, so we could help you better! (This issue will be closed in 7 days)" + duplicate: close + wontfix: close + invalid: close + "squash when passing": merge + "rebase when passing": merge + "merge when passing": merge +#comments: +# - action: delete_comment +# pattern: "+1" # can also be a regular expression diff --git a/CHANGELOG.MD b/CHANGELOG.MD index c72f9305..f849107a 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -4,6 +4,8 @@ See also [releases](https://github.com/NLog/NLog.Web/releases) and [milestones]( Date format: (year/month/day) +### v4.8.5 aspnetcore (2019/07/02) +- [#459](https://github.com/NLog/NLog.Web/pull/459) Fixed double logging when mixing UseNLog with AddNLog (@snakefoot) ### v4.8.4 aspnetcore (2019/07/02) - [#436](https://github.com/NLog/NLog.Web/pull/436) Better checking for availability of session (@Defee, @snakefoot) diff --git a/NLog.Web.sln b/NLog.Web.sln index 422ed6d7..8b1f76c5 100644 --- a/NLog.Web.sln +++ b/NLog.Web.sln @@ -3,6 +3,10 @@ Microsoft Visual Studio Solution File, Format Version 12.00 VisualStudioVersion = 15.0.26730.16 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{52CA242D-DB20-41D9-8B79-A5A965ECA105}" + ProjectSection(SolutionItems) = preProject + appveyor.yml = appveyor.yml + CHANGELOG.MD = CHANGELOG.MD + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NLog.Web", "src\NLog.Web\NLog.Web.csproj", "{E30DC886-8431-4CFA-90FA-38D9BE4203A0}" EndProject @@ -51,10 +55,6 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {E30DC886-8431-4CFA-90FA-38D9BE4203A0} = {52CA242D-DB20-41D9-8B79-A5A965ECA105} - {E318FB41-9712-44CA-B792-E865EFE1A564} = {52CA242D-DB20-41D9-8B79-A5A965ECA105} - {9E3F7ECB-A6ED-422E-8429-F96C510F59CF} = {52CA242D-DB20-41D9-8B79-A5A965ECA105} - {C02D4CED-0098-4526-BB95-6AB9D988036D} = {52CA242D-DB20-41D9-8B79-A5A965ECA105} {D43A99EE-F27F-4552-9E23-C9686809AC3D} = {A9FB260C-9052-45D3-827A-20590F9D2FEF} {0BF1FB4E-D5AE-46DE-9E80-E2DD40235552} = {A9FB260C-9052-45D3-827A-20590F9D2FEF} EndGlobalSection diff --git a/appveyor.yml b/appveyor.yml index 8b20fe64..7103c865 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 4.8.4.{build} +version: 4.8.5.{build} clone_folder: c:\projects\nlogweb configuration: Release image: Visual Studio 2017 @@ -22,7 +22,7 @@ skip_tags: true build_script: - ps: | - $versionPrefix = "4.8.4" + $versionPrefix = "4.8.5" $versionSuffix = "" $versionBuild = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER} $versionNuget = $versionPrefix diff --git a/src/NLog.Web.AspNetCore/AspNetExtensions.cs b/src/NLog.Web.AspNetCore/AspNetExtensions.cs index 26cd3fe9..077063ae 100644 --- a/src/NLog.Web.AspNetCore/AspNetExtensions.cs +++ b/src/NLog.Web.AspNetCore/AspNetExtensions.cs @@ -157,7 +157,7 @@ private static void ConfigureServicesNLog(NLogAspNetCoreOptions options, IServic ConfigurationItemFactory.Default.RegisterItemsFromAssembly(typeof(AspNetExtensions).GetTypeInfo().Assembly); LogManager.AddHiddenAssembly(typeof(AspNetExtensions).GetTypeInfo().Assembly); - services.AddSingleton(serviceProvider => + services.Replace(ServiceDescriptor.Singleton(serviceProvider => { ServiceLocator.ServiceProvider = serviceProvider; @@ -173,7 +173,7 @@ private static void ConfigureServicesNLog(NLogAspNetCoreOptions options, IServic } return provider; - }); + })); //note: this one is called before services.AddSingleton if ((options ?? NLogAspNetCoreOptions.Default).RegisterHttpContextAccessor) diff --git a/src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj b/src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj index 53023402..e792c817 100644 --- a/src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj +++ b/src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj @@ -4,13 +4,12 @@ netstandard1.5;net451;net461;netstandard2.0 NLog.Web.AspNetCore v$(VersionPrefix) -Use NLog with the ASP.NET Core platform. Adds helpers and layout renderers for websites and webapplications. +NLog LoggerProvider for Microsoft.Extensions.Logging and ASP.NET Core platform. Adds helpers and layout renderers for websites and web applications. Supported platforms: - For ASP.NET Core 2, .NET Standard 2.0+ and .NET 4.6+ -- For ASP.NET Core 1, .NET Standard 1.5+ and .NET 4.5.x - +- For ASP.NET Core 1, .NET Standard 1.5+ and .NET 4.5.x Julian Verdurmen NLog @@ -18,9 +17,10 @@ Supported platforms: Copyright (c) 2015-$(CurrentYear) NLog Project - https://nlog-project.org/ NLog.Web.AspNetCore NLog.Web.AspNetCore - logging;log;session;NLog;web;aspnet;aspnetcore;MVC;httpcontext + logging;log;NLog;web;aspnet;aspnetcore;MVC;Microsoft.Extensions.Logging;httpcontext;session -- Better checking for availability of session (@Defee, @snakefoot) +- Fixed double logging when mixing UseNLog with AddNLog (@snakefoot) +- Updated nuget-package description to make it easier to discover (@snakefoot) https://nlog-project.org/N.png https://github.com/NLog/NLog.Web @@ -57,7 +57,7 @@ Supported platforms: $(DefineConstants);ASP_NET_CORE;ASP_NET_CORE2 - + diff --git a/src/NLog.Web/NLog.Web.csproj b/src/NLog.Web/NLog.Web.csproj index 3e16b54a..898cfdda 100644 --- a/src/NLog.Web/NLog.Web.csproj +++ b/src/NLog.Web/NLog.Web.csproj @@ -4,7 +4,8 @@ net35 NLog.Web v$(VersionPrefix) -Extend NLog with targets and layout renderers for websites and web applications. +NLog logging for ASP.NET and ASP.NET MVC. Includes targets and layout renderers for websites and web applications. + This package is for ASP.NET 3.5+ For ASP.NET Core: Check https://www.nuget.org/packages/NLog.Web.AspNetCore @@ -15,10 +16,10 @@ For ASP.NET Core: Check https://www.nuget.org/packages/NLog.Web.AspNetCore Copyright (c) 2015-$(CurrentYear) NLog Project - https://nlog-project.org/ NLog.Web NLog.Web - nlog log target layoutrenderer web asp.net httpcontext + nlog;log;logging;target;layoutrenderer;web;asp.net;MVC;httpcontext -- Better checking for availability of session (@Defee, @snakefoot) -- Fixed Nuget-Package generation to include dependencies and release notes (@snakefoot) +- Updated NLog dependency +- Updated nuget-package description to make it easier to discover (@snakefoot) https://nlog-project.org/N.png https://github.com/NLog/NLog.Web @@ -33,9 +34,10 @@ For ASP.NET Core: Check https://www.nuget.org/packages/NLog.Web.AspNetCore true true $(Title) + true - + diff --git a/tests/NLog.Web.AspNetCore.Tests/NLog.Web.AspNetCore.Tests.csproj b/tests/NLog.Web.AspNetCore.Tests/NLog.Web.AspNetCore.Tests.csproj index 33b2423e..5825fa41 100644 --- a/tests/NLog.Web.AspNetCore.Tests/NLog.Web.AspNetCore.Tests.csproj +++ b/tests/NLog.Web.AspNetCore.Tests/NLog.Web.AspNetCore.Tests.csproj @@ -19,7 +19,7 @@ - + diff --git a/tests/NLog.Web.Tests/NLog.Web.Tests.csproj b/tests/NLog.Web.Tests/NLog.Web.Tests.csproj index 7d0597ee..9c9ab88a 100644 --- a/tests/NLog.Web.Tests/NLog.Web.Tests.csproj +++ b/tests/NLog.Web.Tests/NLog.Web.Tests.csproj @@ -21,7 +21,7 @@ - +