NLog 4.6.0-rc1

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.
There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated or shouldn't be used anymore.
Install-Package NLog -Version 4.6.0-rc1
dotnet add package NLog --version 4.6.0-rc1
<PackageReference Include="NLog" Version="4.6.0-rc1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
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/

Showing the top 10 GitHub repositories that depend on NLog:

Repository Stars
Wox-launcher/Wox
Launcher for Windows, an alternative to Alfred and Launchy.
aspnet/AspNetCore.Docs
Documentation for ASP.NET Core
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
JustArchiNET/ArchiSteamFarm
C# application with primary purpose of idling Steam cards from multiple accounts simultaneously.
EventStore/EventStore
The stream database optimised for event sourcing
Radarr/Radarr
A fork of Sonarr to work with movies à la Couchpotato.
Jackett/Jackett
API Support for your favorite torrent trackers.
Topshelf/Topshelf
An easy service hosting framework for building Windows services using .NET
dotnetcore/Util
Util是一个.net core平台下的应用框架,旨在提升小型团队的开发输出能力,由常用公共操作类(工具类)、分层架构基类、Ui组件,第三方组件封装,第三方业务接口封装,配套代码生成模板,权限等组成。

Version History

Version Downloads Last updated
4.6.7 284,982 8/25/2019
4.6.6 410,291 7/14/2019
4.6.5 504,308 6/14/2019
4.6.4 536,823 5/28/2019
4.6.3 558,409 4/30/2019
4.6.2 475,197 4/2/2019
4.6.1 65,244 3/29/2019
4.6.0 198,406 3/21/2019
4.5.11 2,997,616 11/6/2018
4.5.10 1,892,916 9/17/2018
4.5.9 577,920 8/24/2018
4.5.8 833,902 8/5/2018
4.5.7 407,176 7/19/2018
4.5.6 1,187,216 5/29/2018
4.5.5 301,346 5/25/2018
4.5.4 954,171 5/5/2018
4.5.3 544,907 4/16/2018
4.5.2 474,753 4/6/2018
4.5.1 129,723 4/3/2018
4.5.0 1,196,543 3/25/2018
4.4.13 372,985 2/27/2018
4.4.12 2,903,611 8/8/2017
4.4.11 813,118 6/17/2017
4.4.10 232,473 5/31/2017
4.4.9 561,091 5/5/2017
4.4.8 91,259 4/28/2017
4.4.7 68,710 4/25/2017
4.4.6 176,816 4/15/2017
4.4.5 265,378 3/28/2017
4.4.4 286,363 3/10/2017
4.4.3 424,169 2/17/2017
4.4.2 217,642 2/6/2017
4.4.1 629,559 12/24/2016
4.4.0 187,085 12/14/2016
4.3.11 608,542 11/7/2016
4.3.10 389,044 10/11/2016
4.3.9 318,125 9/18/2016
4.3.8 390,418 9/5/2016
4.3.7 374,248 8/6/2016
4.3.6 181,674 7/23/2016
4.3.5 566,602 6/12/2016
4.3.4 463,097 5/16/2016
4.3.3 199,342 4/28/2016
4.3.2 60,671 4/26/2016
4.3.1 76,246 4/20/2016
4.3.0 65,635 4/16/2016
4.2.3 910,633 12/20/2015
4.2.2 166,890 12/2/2015
4.2.1 109,537 11/21/2015
4.2.0 259,181 10/24/2015
4.1.2 447,781 9/20/2015
4.1.1 78,875 9/12/2015
4.1.0 127,249 8/31/2015
4.0.1 478,504 6/18/2015
4.0.0 389,934 6/9/2015
3.2.1 469,450 4/24/2015
3.2.0 877,726 1/2/2015
3.1.0 902,647 6/24/2014
3.0.0 140,930 6/2/2014
2.1.0 757,421 10/10/2013
2.0.1.2 448,810 4/8/2013
2.0.0.2000 703,356 7/18/2011
1.0.0.505 136,969 1/7/2011
Show less