diff --git a/src/NLog.Extensions.Hosting/NLog.Extensions.Hosting.csproj b/src/NLog.Extensions.Hosting/NLog.Extensions.Hosting.csproj index 05d2f80d..7131ffab 100644 --- a/src/NLog.Extensions.Hosting/NLog.Extensions.Hosting.csproj +++ b/src/NLog.Extensions.Hosting/NLog.Extensions.Hosting.csproj @@ -15,15 +15,16 @@ For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore - https://github.com/NLog/NLog.Extensions.Logging - BSD-2-Clause - N.png - https://github.com/NLog/NLog.Extensions.Logging.git - git NLog;Microsoft.Extensions.Hosting;log;logging;logfiles;netcore -Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHANGELOG.MD + Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHANGELOG.MD + https://github.com/NLog/NLog.Extensions.Logging + https://github.com/NLog/NLog.Extensions.Logging.git + git + BSD-2-Clause + N.png + README.md {548E65CE-0378-4812-AE00-B173F1251D3C} @@ -66,6 +67,7 @@ Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHAN + diff --git a/src/NLog.Extensions.Hosting/README.md b/src/NLog.Extensions.Hosting/README.md new file mode 100644 index 00000000..a0267754 --- /dev/null +++ b/src/NLog.Extensions.Hosting/README.md @@ -0,0 +1,38 @@ +# NLog.Extensions.Hosting + +[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.extensions.logging&branch=masterr&metric=reliability_rating)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master) +[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.extensions.logging&branch=master&metric=sqale_rating)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master) +[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.extensions.logging&branch=master&metric=vulnerabilities)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master) + +Integrates NLog as Logging provider for Microsoft.Extensions.Logging, by just calling `UseNLog()` on the application-IHostBuilder. + +Providing features like: + +- Capture [structured message properties](https://github.com/NLog/NLog.Extensions.Logging/wiki/NLog-properties-with-Microsoft-Extension-Logging) from the [Microsoft ILogger](https://github.com/NLog/NLog.Extensions.Logging/wiki/NLog-GetCurrentClassLogger-and-Microsoft-ILogger) +- Capture scope context properties from the Microsoft ILogger `BeginScope` +- Load NLog configuration from [appsettings.json](https://github.com/NLog/NLog.Extensions.Logging/wiki/NLog-configuration-with-appsettings.json) +- Routing logging output to multiple destinations via the available [NLog Targets](https://nlog-project.org/config/?tab=targets) +- Enrich logging output with additional context details via the available [NLog LayoutRenderers](https://nlog-project.org/config/?tab=layout-renderers) +- Rendering logging output into standard formats like JSON, CVS, W3C ELF and XML using [NLog Layouts](https://nlog-project.org/config/?tab=layouts). + +If using ASP.NET Core then check [NLog.Web.AspNetCore](https://www.nuget.org/packages/NLog.Web.AspNetCore). + +Supported platforms: + + - .NET 5, 6 and 7 + - .NET Core 2 and 3 + - .NET Standard 2.0+ + +Registration of NLog as logging provider: + +```csharp +builder.UseNLog(); +``` + +Useful Links + +- [Home Page](https://nlog-project.org/) +- [Change Log](https://github.com/NLog/NLog.Extensions.Logging/releases) +- [Tutorial](https://github.com/NLog/NLog/wiki/Tutorial) +- [Logging Troubleshooting](https://github.com/NLog/NLog/wiki/Logging-troubleshooting) +- [Have a question?](https://stackoverflow.com/questions/tagged/nlog) diff --git a/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj b/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj index 6d22d112..e481b448 100644 --- a/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj +++ b/src/NLog.Extensions.Logging/NLog.Extensions.Logging.csproj @@ -1,4 +1,4 @@ - + net461;netstandard1.3;netstandard1.5;netstandard2.0;netstandard2.1;net6.0 Full @@ -24,10 +24,12 @@ Full changelog: https://github.com/NLog/NLog.Extensions.Logging/blob/master/CHAN List of major changes in NLog 5.0: https://nlog-project.org/2021/08/25/nlog-5-0-preview1-ready.html https://github.com/NLog/NLog.Extensions.Logging - BSD-2-Clause - N.png https://github.com/NLog/NLog.Extensions.Logging.git git + BSD-2-Clause + N.png + README.md + {6A236D76-C9D9-4B1D-8DDE-F6978D110288} true @@ -112,6 +114,7 @@ List of major changes in NLog 5.0: https://nlog-project.org/2021/08/25/nlog-5-0- + diff --git a/src/NLog.Extensions.Logging/README.md b/src/NLog.Extensions.Logging/README.md new file mode 100644 index 00000000..f9892127 --- /dev/null +++ b/src/NLog.Extensions.Logging/README.md @@ -0,0 +1,40 @@ +# NLog.Extensions.Logging + +[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.extensions.logging&branch=masterr&metric=reliability_rating)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master) +[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.extensions.logging&branch=master&metric=sqale_rating)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master) +[![](https://sonarcloud.io/api/project_badges/measure?project=nlog.extensions.logging&branch=master&metric=vulnerabilities)](https://sonarcloud.io/dashboard/?id=nlog.web&branch=master) + +Integrates NLog as Logging provider for Microsoft.Extensions.Logging, by just calling `AddNLog()` on the Logging-builder. + +Providing features like: + +- Capture [structured message properties](https://github.com/NLog/NLog.Extensions.Logging/wiki/NLog-properties-with-Microsoft-Extension-Logging) from the [Microsoft ILogger](https://github.com/NLog/NLog.Extensions.Logging/wiki/NLog-GetCurrentClassLogger-and-Microsoft-ILogger) +- Capture scope context properties from the Microsoft ILogger `BeginScope` +- Load NLog configuration from [appsettings.json](https://github.com/NLog/NLog.Extensions.Logging/wiki/NLog-configuration-with-appsettings.json) +- Routing logging output to multiple destinations via the available [NLog Targets](https://nlog-project.org/config/?tab=targets) +- Enrich logging output with additional context details via the available [NLog LayoutRenderers](https://nlog-project.org/config/?tab=layout-renderers) +- Rendering logging output into standard formats like JSON, CVS, W3C ELF and XML using [NLog Layouts](https://nlog-project.org/config/?tab=layouts). + +If using ASP.NET Core then check [NLog.Web.AspNetCore](https://www.nuget.org/packages/NLog.Web.AspNetCore). + +Supported platforms: + + - .NET 5, 6 and 7 + - .NET Core 1, 2 and 3 + - .NET Standard 1.3+ and 2.0+ + - .NET 4.6.1 - 4.8 + +Registration of NLog as logging provider: + +```csharp +builder.Logging.ClearProviders(); +builder.Logging.AddNLog(); +``` + +Useful Links + +- [Home Page](https://nlog-project.org/) +- [Change Log](https://github.com/NLog/NLog.Extensions.Logging/releases) +- [Tutorial](https://github.com/NLog/NLog/wiki/Tutorial) +- [Logging Troubleshooting](https://github.com/NLog/NLog/wiki/Logging-troubleshooting) +- [Have a question?](https://stackoverflow.com/questions/tagged/nlog)