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 1,134 2/8/2019
4.5.11 615,314 11/6/2018
4.5.10 843,140 9/17/2018
4.5.9 311,646 8/24/2018
4.5.8 487,766 8/5/2018
4.5.7 254,448 7/19/2018
4.5.6 739,052 5/29/2018
4.5.5 152,818 5/25/2018
4.5.4 584,374 5/5/2018
4.5.3 337,764 4/16/2018
4.5.2 319,324 4/6/2018
4.5.1 73,780 4/3/2018
4.5.0 503,042 3/25/2018
4.4.13 256,613 2/27/2018
4.4.12 2,069,530 8/8/2017
4.4.11 631,697 6/17/2017
4.4.10 191,333 5/31/2017
4.4.9 418,227 5/5/2017
4.4.8 68,765 4/28/2017
4.4.7 50,858 4/25/2017
4.4.6 133,866 4/15/2017
4.4.5 212,936 3/28/2017
4.4.4 214,628 3/10/2017
4.4.3 322,287 2/17/2017
4.4.2 176,936 2/6/2017
4.4.1 482,384 12/24/2016
4.4.0 151,450 12/14/2016
4.3.11 485,177 11/7/2016
4.3.10 320,544 10/11/2016
4.3.9 264,244 9/18/2016
4.3.8 313,803 9/5/2016
4.3.7 315,147 8/6/2016
4.3.6 155,241 7/23/2016
4.3.5 461,377 6/12/2016
4.3.4 360,035 5/16/2016
4.3.3 154,964 4/28/2016
4.3.2 47,084 4/26/2016
4.3.1 63,852 4/20/2016
4.3.0 44,533 4/16/2016
4.2.3 759,568 12/20/2015
4.2.2 136,124 12/2/2015
4.2.1 91,489 11/21/2015
4.2.0 201,756 10/24/2015
4.1.2 372,845 9/20/2015
4.1.1 59,831 9/12/2015
4.1.0 103,485 8/31/2015
4.0.1 407,419 6/18/2015
4.0.0 269,510 6/9/2015
3.2.1 343,535 4/24/2015
3.2.0 722,777 1/2/2015
3.1.0 752,180 6/24/2014
3.0.0 118,367 6/2/2014
2.1.0 652,174 10/10/2013
2.0.1.2 408,847 4/8/2013
2.0.0.2000 631,857 7/18/2011
1.0.0.505 103,169 1/7/2011
Show less