Skip to content

Commit

Permalink
Version 5.3.14 (#1055)
Browse files Browse the repository at this point in the history
* UseNLog should fallback after checking ContentRoot for NLog.config

* Version 5.3.14
  • Loading branch information
snakefoot authored Sep 23, 2024
1 parent 628b087 commit 25a11e1
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 10 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ See also [releases](https://github.com/NLog/NLog.Web/releases) and [milestones](

Date format: (year/month/day)

### Version 5.3.14 (2024/09/23)

- **NLog.Web.AspNetCore**
- [#1055](https://github.com/NLog/NLog.Web/pull/1055) UseNLog should fallback after checking ContentRoot for NLog.config (#1055) (@snakefoot)
- [#1055](https://github.com/NLog/NLog.Web/pull/1055) Updated dependency NLog.Extensions.Logging v5.3.14 (#1055) (@snakefoot)

### Version 5.3.13 (2024/09/12)

- **NLog.Web.AspNetCore**
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build_script:
deploy:
- provider: NuGet
api_key:
secure: ACKSV1ixxNpO+2k8KvNDy6hd9QmR8lkQmKn773ZIIeVpG0ywYUhY4j8LcyykVR1a
secure: C4wzAE+AWne4TbR54gBDkLImCxsfIp21C16wi4LJ3bVSw/HqwZrMSYJ90kl6eAuf
on:
branch: master

Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# creates NuGet package at \artifacts
dotnet --version

$versionPrefix = "5.3.13" # Also update version for minor versions in appveyor.yml
$versionPrefix = "5.3.14" # Also update version for minor versions in appveyor.yml
$versionSuffix = ""
$versionFile = $versionPrefix + "." + ${env:APPVEYOR_BUILD_NUMBER}
if ($env:APPVEYOR_PULL_REQUEST_NUMBER) {
Expand Down
6 changes: 2 additions & 4 deletions src/NLog.Web.AspNetCore/AspNetExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,15 +419,13 @@ private static void TryLoadConfigurationFromContentRootPath(LogFactory logFactor
LoadXmlLoggingConfigurationFromPath(contentRootPath, $"nlog.{environmentName}.config", config.LogFactory) ??
LoadXmlLoggingConfigurationFromPath(contentRootPath, "NLog.config", config.LogFactory) ??
LoadXmlLoggingConfigurationFromPath(contentRootPath, "nlog.config", config.LogFactory);
if (nlogConfig != null)
config.Configuration = nlogConfig;
config.Configuration = nlogConfig;
}
else
{
var nlogConfig = LoadXmlLoggingConfigurationFromPath(contentRootPath, "NLog.config", config.LogFactory) ??
LoadXmlLoggingConfigurationFromPath(contentRootPath, "nlog.config", config.LogFactory);
if (nlogConfig != null)
config.Configuration = nlogConfig;
config.Configuration = nlogConfig;
}
});
}
Expand Down
3 changes: 1 addition & 2 deletions src/NLog.Web.AspNetCore/Config/SetupBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ public static ISetupBuilder LoadConfigurationFromAppSettings(this ISetupBuilder
{
// Fallback when environment-specific NLog config could not load
var nlogConfigFilePath = Path.Combine(basePath, "nlog.config");
if (File.Exists(nlogConfigFilePath))
config.Configuration = new XmlLoggingConfiguration(nlogConfigFilePath, config.LogFactory);
config.Configuration = File.Exists(nlogConfigFilePath) ? new XmlLoggingConfiguration(nlogConfigFilePath, config.LogFactory) : null;
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Integrates NLog as provider for Microsoft.Extensions.Logging, and provides NLog
<PackageReleaseNotes>
ChangeLog:

- AspNetRequestUrlRenderer - Mark Properties-option as DefaultParameter (#1053) (@snakefoot)
- Updated dependency NLog.Extensions.Logging v5.3.13 (#1054) (@snakefoot)
- UseNLog should fallback after checking ContentRoot for NLog.config (#1055) (@snakefoot)
- Updated dependency NLog.Extensions.Logging v5.3.14 (#1055) (@snakefoot)

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

Expand Down

0 comments on commit 25a11e1

Please sign in to comment.