Skip to content

Commit

Permalink
Version 5.0 Release Candidate 1 (#742)
Browse files Browse the repository at this point in the history
  • Loading branch information
snakefoot authored Dec 20, 2021
1 parent ecac594 commit 16d8773
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 11 deletions.
19 changes: 18 additions & 1 deletion CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ See also [releases](https://github.com/NLog/NLog.Web/releases) and [milestones](

Date format: (year/month/day)

### v5.0-rc1 (2021/12/20)

- **NLog.Web.AspNetCore**
- [#734](https://github.com/NLog/NLog.Web/pull/734) LogManager.Setup() - Added support for RegisterAspNetLayoutRenderer (#734) (@snakefoot)
- [#735](https://github.com/NLog/NLog.Web/pull/735) Changed format Culture to InvariantCulture to match default NLog Culture (#735) (@snakefoot)
- [#736](https://github.com/NLog/NLog.Web/pull/736) Added sample for ASP.NET Core 6.0 on .NET 6 (#736) (@ThomasArdal)
- [#740](https://github.com/NLog/NLog.Web/pull/740) Added ${aspnet-request-routeparameters} (#740) (@ThomasArdal)
- [#741](https://github.com/NLog/NLog.Web/pull/741) Changed from Convert.ToString to IValueFormatter to be like NLog default (#741) (@snakefoot)

- **NLog.Web**
- [#734](https://github.com/NLog/NLog.Web/pull/734) LogManager.Setup() - Added support for RegisterNLogWeb + RegisterAspNetLayoutRenderer (#734) (@snakefoot)
- [#735](https://github.com/NLog/NLog.Web/pull/735) Changed format Culture to InvariantCulture to match default NLog Culture (#735) (@snakefoot)
- [#740](https://github.com/NLog/NLog.Web/pull/740) Added ${aspnet-request-routeparameters} (#740) (@ThomasArdal)
- [#741](https://github.com/NLog/NLog.Web/pull/741) Changed from Convert.ToString to IValueFormatter to be like NLog default (#741) (@snakefoot)

See also [Release post for NLog 5](https://nlog-project.org/2021/08/25/nlog-5-0-preview1-ready.html)

### v5.0-preview 3 (2021/10/28)

- **NLog.Web.AspNetCore**
Expand All @@ -18,7 +35,7 @@ Date format: (year/month/day)
- [#700](https://github.com/NLog/NLog.Web/pull/700) Added W3CExtendedLogLayout for writing W3C Extended Logs (#700) (@snakefoot)
- [#697](https://github.com/NLog/NLog.Web/pull/697) Replaced SingleAsArray with OutputFormat = JsonArray + JsonDictionary (#697) (@snakefoot)

See [Release post for NLog 5](https://nlog-project.org/2021/08/25/nlog-5-0-preview1-ready.html)
See also [Release post for NLog 5](https://nlog-project.org/2021/08/25/nlog-5-0-preview1-ready.html)

### v4.14 (2021/08/28)
- **NLog.Web.AspNetCore**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.4" 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.0.0-preview.3" targetFramework="net461" />
<package id="NLog" version="5.0.0-rc1" targetFramework="net461" />
<package id="System.Diagnostics.DiagnosticSource" version="4.4.1" targetFramework="net461" />
<package id="WebGrease" version="1.6.0" targetFramework="net461" />
</packages>
12 changes: 6 additions & 6 deletions src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Supported platforms:
<PackageReleaseNotes>
## Improvements

- Replaced platform NetCoreApp3.0 with NetCoreApp3.1 and added Net5.0 (#701) (@snakefoot)
- Dropped support for ASP.NET Core 1 and NetStandard1.5 + Net452 (#683) (@304NotModified)
- Enabled ShutdownOnDispose by default to follow lifetime of the ServiceProvider (#691) (@snakefoot)
- Added W3CExtendedLogLayout for writing W3C Extended Logs (#700) (@snakefoot)
- Replaced SingleAsArray with OutputFormat = JsonArray + JsonDictionary (#697) (@snakefoot)
- [#734] LogManager.Setup() - Added support for RegisterAspNetLayoutRenderer (#734) (@snakefoot)
- [#735] Changed format Culture to InvariantCulture to match default NLog Culture (#735) (@snakefoot)
- [#736] Added sample for ASP.NET Core 6.0 on .NET 6 (#736) (@ThomasArdal)
- [#740] Added ${aspnet-request-routeparameters} (#740) (@ThomasArdal)
- [#741] Changed from Convert.ToString to IValueFormatter to be like NLog default (#741) (@snakefoot)

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

Expand Down Expand Up @@ -78,7 +78,7 @@ NLog 5 release post: https://nlog-project.org/2021/08/25/nlog-5-0-preview1-ready
<DefineConstants>$(DefineConstants);ASP_NET_CORE;ASP_NET_CORE3</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NLog.Extensions.Logging" Version="5.0.0-preview.3" />
<PackageReference Include="NLog.Extensions.Logging" Version="5.0.0-rc1" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net461' ">
<!-- Fixed to 2.1.0 as 2.1 is Long Term Supported (LTS) and works with vanilla .NET Core 2.1 SDK -->
Expand Down
2 changes: 1 addition & 1 deletion src/NLog.Web.AspNetCore/NLogRequestLoggingMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ private bool LogHttpRequest(HttpContext httpContext, Exception exception)
else
{
var statusCode = httpContext.Response?.StatusCode ?? 0;
if (statusCode < 100 || statusCode >= 400)
if (statusCode < 100 || (statusCode >= 400 && statusCode < 600))
{
_logger.LogWarning("HttpRequest Failed");
}
Expand Down
2 changes: 1 addition & 1 deletion src/NLog.Web/NLog.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ See https://github.com/NLog/NLog.Web/releases
<DownloadFile SourceUrl="https://nlog-project.org/N.png" DestinationFolder="$(MSBuildThisFileDirectory)" />
</Target>
<ItemGroup>
<PackageReference Include="NLog" Version="5.0.0-preview.3" />
<PackageReference Include="NLog" Version="5.0.0-rc1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/NLog.Web/NLogRequestLoggingModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ private void LogHttpRequest(object sender, EventArgs e)
{
if (exception != null)
Logger.Error(exception, "HttpRequest Exception");
else if (statusCode < 100 || statusCode >= 400)
else if (statusCode < 100 || (statusCode >= 400 && statusCode < 600))
Logger.Warn("HttpRequest Failed");
else
Logger.Info("HttpRequest Completed");
Expand Down

0 comments on commit 16d8773

Please sign in to comment.