NLog 4.6.0-rc1

NLog for .NET Framework and .NET Standard

NLog is a logging platform for .NET with rich log routing and management capabilities.
NLog supports traditional logging, structured logging and the combination of both.

Supported platforms:

- .NET Framework 3.5, 4, 4.5, 4.6 & 4.7
- .NET Standard 1.3+ and 2.0+;
- .NET Framework 4 client profile
- Xamarin Android, Xamarin iOs
- UWP
- Windows Phone 8
- Silverlight 4 and 5
- Mono 4

For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore

This is a prerelease version of NLog.
Install-Package NLog -Version 4.6.0-rc1
dotnet add package NLog --version 4.6.0-rc1
paket add NLog --version 4.6.0-rc1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

**Features:**

* #2363 + #2899 + #3085 + #3091 Database target: support for DbType for parameters (including SqlDbType) -  (@hubo0831,@ObikeDev,@sorvis, @304NotModified, @snakefoot)
* #2610 AsyncTargetWrapper with LogEventDropped- + LogEventQueueGrow-events (@Pomoinytskyi)
* #2670 + #3014 XmlLayout - Render LogEventInfo.Properties as XML (@snakefoot)
* #2678 NetworkTarget - Support for SSL & TLS (@snakefoot)
* #2709 XML Config: Support for constant variable in level attributes (level, minlevel, etc) (@304NotModified)
* #2848 Added defaultAction for <filter> (@304NotModified)
* #2849 IRawValue-interface and ${db-null} layout renderer (@304NotModified)
* #2902 JsonLayout with support for System.Dynamic-objects (@304NotModified)
* #2907 New Substring, Left & Right Wrappers (@304NotModified)
* #3098 <rule> support for one or more '*' and '?' wildcards and in any position  (@beppemarazzi)
* #2909 AsyncTaskTarget - BatchSize + RetryCount (@snakefoot)
* #3018 ColoredConsoleTarget - Added EnableAnsiOutput option (VS Code support) (@jp7677 + @snakefoot)
* #3031 + #3092 Support ${currentdir},${basedir},${tempdir} and Environment Variables for internalLogFile when parsing nlog.config (@snakefoot)
* #3050 Added IncludeGdc property in JsonLayout (@casperc89)
* #3071 ${HostName} Layout Renderer for full computer DNS name (@amitsaha)
* #3053 ${AppSetting} Layout Renderer (app.config + web.config) moved from NLog.Extended for NetFramework (@snakefoot)
* #3060 TargetWithContext - Support for PropertyType using IRawValue-interface (@snakefoot)

**Enhancements:**

* #2989 JsonLayout includes Type-property when rendering Exception-object (@snakefoot)
* #2891 LoggingConfigurationParser - Extracted from XmlLoggingConfiguration (Prepare for appsettings.json)  (@snakefoot)
* #2910 Added support for complex objects in MDLC and NDLC on Net45  (@snakefoot)
* #2918 PerformanceCounter - Improve behavior for CPU usage calculation  (@snakefoot)
* #2941 TargetWithContext - Include all properties even when duplicate names  (@snakefoot)
* #2974 Updated resharper annotations for better validation (@imanushin)
* #2979 Improve default reflection support on NetCore Native (@snakefoot)
* #3017 EventLogTarget with better support for MaximumKilobytes configuration (@Coriolanuss)
* #3039 Added Xamarin PreserveAttribute for the entire Assembly to improve AOT-linking (@snakefoot)
* #3045 Create snupkg packages and use portable PDB (@snakefoot)
* #3048 KeepFileOpen + ConcurrentWrites on Xamarin + UWP - #3079 (@304NotModified)
* #3082 + #3100  WebService Target allow custom override of SoapAction-header for Soap11 (@AlexeyRokhin)
* Various refactorings (15 pull requests) (@beppemarazzi, @304NotModified, @snakefoot)

**Performance:**

* #2650 AsyncTargetWrapper using ConcurrentQueue for NetCore2 for better thread-concurrency (@snakefoot)
* #2890 AsyncTargetWrapper - TimeToSleepBetweenBatches changed default to 1ms (@snakefoot)
* #2897 InternalLogger performance optimization when LogLevel.Off (@snakefoot)
* #2935 InternalLogger LogLevel changes to LogLevel.Off by default unless being used. (@snakefoot)
* #2934 CsvLayout - Allocation optimizations and optional skip quoting-check for individual columns. (@snakefoot)
* #2949 MappedDiagnosticsLogicalContext - SetScoped with IReadOnlyList (Prepare for MEL BeginScope) (@snakefoot)
* #2973 IRenderString-interface to improve performance for Layout with single LayoutRenderer (@snakefoot)
* #3103 StringBuilderPool - Reduce memory overhead until required (@snakefoot)

**LibLog Breaking change**

* [damianh/LibLog#181](https://github.com/damianh/LibLog/pull/181) - Sub-components using LibLog ver. 5.0.3 (or newer) will now use MDLC + NDLC (Instead of MDC + NDC) when detecting application is using NLog ver. 4.6. Make sure to update NLog.config to match this change. Make sure that all sub-components have upgraded to LibLog ver. 5.0.3 (or newer) if they make use of `OpenNestedContext` or `OpenMappedContext`.

See also [NLog 4.6 Milestone](https://github.com/NLog/NLog/milestone/44?closed=1)

Full changelog: https://github.com/NLog/NLog/blob/master/CHANGELOG.md

Supported can be found on https://nlog-project.org/config/

Version History

Version Downloads Last updated
4.6.0-rc1 911 2/8/2019
4.5.11 602,327 11/6/2018
4.5.10 836,630 9/17/2018
4.5.9 310,076 8/24/2018
4.5.8 485,705 8/5/2018
4.5.7 253,543 7/19/2018
4.5.6 736,650 5/29/2018
4.5.5 151,694 5/25/2018
4.5.4 582,690 5/5/2018
4.5.3 336,812 4/16/2018
4.5.2 318,731 4/6/2018
4.5.1 73,589 4/3/2018
4.5.0 500,753 3/25/2018
4.4.13 255,912 2/27/2018
4.4.12 2,065,287 8/8/2017
4.4.11 630,520 6/17/2017
4.4.10 191,168 5/31/2017
4.4.9 417,644 5/5/2017
4.4.8 68,707 4/28/2017
4.4.7 50,748 4/25/2017
4.4.6 133,707 4/15/2017
4.4.5 212,751 3/28/2017
4.4.4 214,403 3/10/2017
4.4.3 321,893 2/17/2017
4.4.2 176,738 2/6/2017
4.4.1 481,695 12/24/2016
4.4.0 151,266 12/14/2016
4.3.11 484,439 11/7/2016
4.3.10 320,186 10/11/2016
4.3.9 263,965 9/18/2016
4.3.8 313,351 9/5/2016
4.3.7 314,959 8/6/2016
4.3.6 155,128 7/23/2016
4.3.5 460,979 6/12/2016
4.3.4 359,502 5/16/2016
4.3.3 154,829 4/28/2016
4.3.2 47,061 4/26/2016
4.3.1 63,822 4/20/2016
4.3.0 44,473 4/16/2016
4.2.3 758,804 12/20/2015
4.2.2 136,017 12/2/2015
4.2.1 91,423 11/21/2015
4.2.0 201,547 10/24/2015
4.1.2 372,540 9/20/2015
4.1.1 59,745 9/12/2015
4.1.0 103,413 8/31/2015
4.0.1 407,048 6/18/2015
4.0.0 269,083 6/9/2015
3.2.1 342,989 4/24/2015
3.2.0 722,137 1/2/2015
3.1.0 751,590 6/24/2014
3.0.0 118,323 6/2/2014
2.1.0 651,775 10/10/2013
2.0.1.2 408,690 4/8/2013
2.0.0.2000 631,518 7/18/2011
1.0.0.505 103,057 1/7/2011
Show less