Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 5.2.1 #915

Merged
merged 1 commit into from Dec 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.MD
Expand Up @@ -4,6 +4,20 @@ See also [releases](https://github.com/NLog/NLog.Web/releases) and [milestones](

Date format: (year/month/day)

### Version 5.2.1 (2022/12/29)

- **NLog.Web.AspNetCore**
- [#900](https://github.com/NLog/NLog.Web/pull/900) Introduced NLogBufferingTargetWrapperMiddleware to support AspNetBufferingWrapper (#900) (@bakgerman)
- [#898](https://github.com/NLog/NLog.Web/pull/898) Created README.md for the NLog.Web.AspNetCore nuget-package (#898) (@bakgerman)
- [#904](https://github.com/NLog/NLog.Web/pull/904) Added common Items-property for LayoutRenderers that can output multiple values. Ex Headers/Cookies (#904) (@snakefoot)
- [#915](https://github.com/NLog/NLog.Web/pull/915) Updated dependency NLog.Extensions.Logging v5.2.1 (#915) (@snakefoot)

- **NLog.Web**
- [#900](https://github.com/NLog/NLog.Web/pull/900) Extend AspNetBufferingWrapper to allow use with other integrations than NLogHttpModule (#900) (@bakgerman)
- [#898](https://github.com/NLog/NLog.Web/pull/898) Created README.md for the NLog.Web nuget-package (#898) (@bakgerman)
- [#904](https://github.com/NLog/NLog.Web/pull/904) Added common Items-property for LayoutRenderers that can output multiple values. Ex Headers/Cookies (#904) (@snakefoot)
- [#915](https://github.com/NLog/NLog.Web/pull/915) Updated dependency NLog v5.1.1 (#915) (@snakefoot)

### Version 5.2.0 (2022/11/27)

- **NLog.Web.AspNetCore**
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Expand Up @@ -2,7 +2,7 @@
# creates NuGet package at \artifacts
dotnet --version

$versionPrefix = "5.2.0" # Also update version for minor versions in appveyor.yml
$versionPrefix = "5.2.1" # Also update version for minor versions in appveyor.yml
$versionSuffix = ""
$versionFile = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER}
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
Expand Down
Expand Up @@ -12,7 +12,7 @@
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.1.2" targetFramework="net461" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net461" />
<package id="Modernizr" version="2.8.3" targetFramework="net461" />
<package id="NLog" version="5.1.0" targetFramework="net461" />
<package id="NLog" version="5.1.1" targetFramework="net461" />
<package id="System.Diagnostics.DiagnosticSource" version="4.4.1" targetFramework="net461" />
<package id="WebGrease" version="1.6.0" targetFramework="net461" />
</packages>
28 changes: 12 additions & 16 deletions src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
Expand Up @@ -4,8 +4,8 @@
<TargetFrameworks>net461;netstandard2.0;netcoreapp3.1;net5.0;net6.0</TargetFrameworks>
<Product>NLog.Web.AspNetCore v$(VersionPrefix)</Product>
<Description>
Integrates NLog as provider for Microsoft.Extensions.Logging, and provides NLog LayoutRenderers to enrich logging output with details from HttpContext.
</Description>
Integrates NLog as provider for Microsoft.Extensions.Logging, and provides NLog LayoutRenderers to enrich logging output with details from HttpContext.
</Description>
<Authors>Julian Verdurmen</Authors>
<Company>NLog</Company>
<CurrentYear>$([System.DateTime]::Now.ToString(yyyy))</CurrentYear>
Expand All @@ -14,14 +14,10 @@
<PackageId>NLog.Web.AspNetCore</PackageId>
<PackageTags>logging;log;NLog;web;aspnet;aspnetcore;MVC;Microsoft.Extensions.Logging;httpcontext</PackageTags>
<PackageReleaseNotes>
- Changed LoadConfigurationFromAppSettings to prioritize current directory (#885) (@snakefoot)
- Changed AspNetAppBasePathLayoutRenderer to prioritize current directory (#887) (@snakefoot)
- Add ObjectPath to AspNetItemValueLayoutRenderer as better alternative to EvaluateAsNestedProperties (#890) (@bakgerman)
- Add ObjectPath to AspNetSessionValueLayoutRenderer as better alternative to EvaluateAsNestedProperties (#894) (@snakefoot)
- Use CallerArgumentExpressionAttribute in helper method for throwing ArgumentNullException (#889) (@bakgerman)
- Skip allocating RouteData when only need to lookup single value (#891) (@snakefoot)
- Use RegisterConfigSettings instead of ConfigSettingLayoutRenderer (#878 + #879) (@snakefoot)
- Updated dependency NLog.Extensions.Logging v5.2.0 (#894) (@snakefoot)
- Introduced NLogBufferingTargetWrapperMiddleware to support AspNetBufferingWrapper (#900) (@bakgerman)
- Created README.md for the NLog.Web.AspNetCore nuget-package (#898) (@bakgerman)
- Added common Items-property for LayoutRenderers that can output multiple values. Ex Headers/Cookies (#904) (@snakefoot)
- Updated dependency NLog.Extensions.Logging v5.2.1 (#915) (@snakefoot)

List of major changes in NLog 5.0: https://nlog-project.org/2022/05/16/nlog-5-0-finally-ready.html

Expand All @@ -42,13 +38,13 @@ List of available Layout Renderers: https://nlog-project.org/config/?tab=layout-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyTitle>$(Title)</AssemblyTitle>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- EmbedUntrackedSources for deterministic build -->
<PackageReadmeFile>README.md</PackageReadmeFile>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Include="N.png" Pack="true" PackagePath="" Visible="false" />
<None Include="README.md" Pack="true" PackagePath=""/>
<None Include="README.md" Pack="true" PackagePath=""/>
</ItemGroup>
<Target Name="DownloadMissingContent" BeforeTargets="GenerateNuspec">
<DownloadFile SourceUrl="https://nlog-project.org/N.png" DestinationFolder="$(MSBuildThisFileDirectory)" />
Expand Down Expand Up @@ -76,7 +72,7 @@ List of available Layout Renderers: https://nlog-project.org/config/?tab=layout-
<DefineConstants>$(DefineConstants);ASP_NET_CORE;ASP_NET_CORE3</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.0" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.2.1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net461' ">
<!-- Fixed to 2.1.0 as 2.1 is Long Term Supported (LTS) and only supported version for .NET Framework 4.6.1 -->
Expand All @@ -100,10 +96,10 @@ List of available Layout Renderers: https://nlog-project.org/config/?tab=layout-
<ItemGroup>
<Compile Include="..\Shared\**\*.cs" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="ILLink.Descriptors.xml">
<LogicalName>ILLink.Descriptors.xml</LogicalName>
</EmbeddedResource>
</ItemGroup>
</Project>
</Project>
10 changes: 8 additions & 2 deletions src/NLog.Web.AspNetCore/README.md
Expand Up @@ -5,7 +5,7 @@
[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.web&branch=master&metric=bugs)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master)
[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.web&branch=master&metric=vulnerabilities)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master)

Integrates NLog as [Logging provider](https://learn.microsoft.com/en-us/dotnet/core/extensions/logging-providers) for ASP.NET Core platform via extension methods for IHostBuilder, and IWebHostBuilder.
Integrates NLog as [Logging provider](https://learn.microsoft.com/en-us/dotnet/core/extensions/logging-providers) for the ASP.NET Core platform, by just calling `UseNLog()` with the application host-builder.

Providing features like:

Expand All @@ -22,7 +22,7 @@ Supported platforms:
- For ASP.NET Core 3, .NET Core 3.1
- For ASP.NET Core 2, .NET Standard 2.0 and .NET 4.6.1+

Registration of NLog.Web.AspNetCore in the NLog.config File
Registration of NLog.Web.AspNetCore in the NLog.config file:

```xml
<!-- enable ASP.NET Core layout renderers -->
Expand All @@ -31,6 +31,12 @@ Registration of NLog.Web.AspNetCore in the NLog.config File
</extensions>
```

Registration of NLog.Web.AspNetCore can also be performed with fluent setup:

```csharp
NLog.LogManager.Setup().LoadConfigurationFromAppSettings();
```

Useful Links

- [Home Page](https://nlog-project.org/)
Expand Down
18 changes: 9 additions & 9 deletions src/NLog.Web/NLog.Web.csproj
Expand Up @@ -21,9 +21,9 @@ For ASP.NET Core: Check https://www.nuget.org/packages/NLog.Web.AspNetCore
Remember to register NLog.Web in NLog.config

&lt;extensions&gt;
&lt;add assembly="NLog.Web" /&gt;
&lt;add assembly="NLog.Web" /&gt;
&lt;/extensions&gt;

Full changelog: https://github.com/NLog/NLog.Web/releases

List of available Layout Renderers: https://nlog-project.org/config/?tab=layout-renderers&amp;search=package:nlog.web
Expand All @@ -33,28 +33,28 @@ List of available Layout Renderers: https://nlog-project.org/config/?tab=layout-
<PackageLicenseExpression>BSD-3-Clause</PackageLicenseExpression>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/NLog/NLog.Web.git</RepositoryUrl>

<SignAssembly>true</SignAssembly>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<AssemblyOriginatorKeyFile>NLog.snk</AssemblyOriginatorKeyFile>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyTitle>$(Title)</AssemblyTitle>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<!-- EmbedUntrackedSources for deterministic build -->
<PackageReadmeFile>README.md</PackageReadmeFile>
<!-- EmbedUntrackedSources for deterministic build -->
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Include="N.png" Pack="true" PackagePath="" Visible="false" />
<None Include="README.md" Pack="true" PackagePath=""/>
<None Include="README.md" Pack="true" PackagePath="" />
</ItemGroup>
<Target Name="DownloadMissingContent" BeforeTargets="GenerateNuspec">
<DownloadFile SourceUrl="https://nlog-project.org/N.png" DestinationFolder="$(MSBuildThisFileDirectory)" />
</Target>
<ItemGroup>
<PackageReference Include="NLog" Version="5.1.0" />
<PackageReference Include="NLog" Version="5.1.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion src/NLog.Web/README.md
Expand Up @@ -19,7 +19,7 @@ Supported platforms:

- .NET 3.5 - 4.8

Registration of NLog.Web in the NLog.config File
Registration of NLog.Web in the NLog.config file:

```xml
<!-- enable ASP.NET layout renderers -->
Expand All @@ -28,6 +28,12 @@ Registration of NLog.Web in the NLog.config File
</extensions>
```

Registration of NLog.Web can also be performed with fluent setup:

```csharp
NLog.LogManager.Setup().RegisterNLogWeb();
```

Useful Links

- [Home Page](https://nlog-project.org/)
Expand Down