NLog 4.6.8

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 & 4.8 - .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

Showing the top 20 packages that depend on NLog.

Packages Downloads
NLog.Database
NLog.Database includes DatabaseTarget for writing to any database with DbProvider support
12
NLog.Database
NLog.Database includes DatabaseTarget for writing to any database with DbProvider support
14
NLog.Database
NLog.Database includes DatabaseTarget for writing to any database with DbProvider support
15
NLog.Database
NLog.Database includes DatabaseTarget for writing to any database with DbProvider support
40
NLog.Database
NLog.Database includes DatabaseTarget for writing to any database with DbProvider support
53
NLog.Database
NLog.Database includes DatabaseTarget for writing to any database with DbProvider support
64
NLog.Database
NLog.Database includes DatabaseTarget for writing to any database with DbProvider support
75
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
11
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
12
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
15
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
16
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
20
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
23
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
25
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
33
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
35
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
45
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
49
NLog.Extensions.Logging
NLog LoggerProvider for Microsoft.Extensions.Logging for logging in .NET Standard libraries and .NET Core applications. For ASP.NET Core, check: https://www.nuget.org/packages/NLog.Web.AspNetCore
93

Bugfixes

  • DatabaseTarget - Auto escape special chars in password, and improve handling of empty username/password (@304NotModified)
  • LoggingRule - Fixed IndexOutOfRangeException for SetLoggingLevels with LogLevel.Off (@snakefoot)
  • FileTarget - Improved handling of relative path in ArchiveFileName (@snakefoot)
  • ExceptionLayoutRenderer - Fixed missing separator when Format-value gives empty result (@brinko99)
  • $ - Length should not be mandatory (@304NotModified)
  • SimpleLayout - Fixed NullReferenceException in PreCalculate during TryGetRawValue optimization (@snakefoot)

Features

  • LogFactory - AutoShutdown can be configured to unhook from AppDomain-Unload, and avoid premature shutdown with IHostBuilder (@snakefoot)
  • PerformanceCounterLayoutRenderer - Added Layout-support for Instance-property (@snakefoot)
  • $ Layout Renderer for local machine ip-address (@snakefoot + @304NotModified)
  • CachedLayoutRendererWrapper - Added CachedSeconds as ambient property. Ex. $ (@snakefoot)
  • JsonLayout - Added EscapeForwardSlash-option to skip Json-escape of forward slash (@304NotModified)
  • AllEventPropertiesLayoutRenderer - Added Exclude-option that specifies property-keys to skip (@snakefoot)
  • $ - Added new Format-option values HResult and Properties (@snakefoot)

Improvements

  • ConcurrentRequestQueue refactoring to reduce code complexity (@snakefoot)
  • AsyncTargetWrapper now fallback to clearing internal queue if flush fails to release blocked writer threads (@snakefoot)
  • $ - Small improvements for recognizing async callsite cases (@snakefoot)
  • LogManager.GetCurrentClassLogger - Improved capture of Logger name when called within lambda_method (@snakefoot)
  • $ fallback to process directory for .NET Core 3 Single File Publish (@snakefoot)
  • Auto-loading NLog configuration from process.exe.nlog will priotize process directory for .NET Core 3 Single File Publish (@snakefoot)
  • ObjectPathRendererWrapper minor refactorings (@snakefoot)
  • ObjectHandleSerializer.GetObjectData includes SerializationFormatter=true for use in MDLC + NDLC (@snakefoot)
  • FileTarget - Extra logging when FileName Layout renders empty string (@snakefoot)

Performance

  • LogFactory - Faster initial assembly reflection and config loading (@snakefoot)
  • ConsoleTarget - Added WriteBuffer option that allows batch writing to console-stream with reduced allocations (@snakefoot)
  • ConsoleTarget - Added global lock to prevent any threadsafety issue from unsafe console (@snakefoot)

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

For all config options and platform support, check https://nlog-project.org/config/

.NET Framework 3.5

  • No dependencies.

.NET Framework 4.0

  • No dependencies.

.NET Framework 4.5

  • No dependencies.

.NET Standard 1.3

.NET Standard 1.5

MonoAndroid 4.4

  • No dependencies.

Silverlight 4.0

  • No dependencies.

Silverlight 5.0

  • No dependencies.

WindowsPhone 8.0

  • No dependencies.

Xamarin.iOS 1.0

  • No dependencies.

.NET Standard 2.0

  • No dependencies.

Version Downloads Last updated
6.0.7 3 12/11/2025
6.0.6 8 11/24/2025
6.0.5 21 10/17/2025
6.0.4 4 10/27/2025
6.0.3 17 08/15/2025
6.0.2 11 07/22/2025
6.0.1 15 07/03/2025
6.0.0 6 06/26/2025
6.0.0-rc4 7 06/26/2025
6.0.0-rc3 6 08/02/2025
6.0.0-rc2 6 08/02/2025
6.0.0-rc1 7 08/02/2025
6.0.0-preview1 6 08/01/2025
5.5.1 5 09/13/2025
5.5.0 6 06/26/2025
5.4.0 59 02/27/2025
5.3.4 52 09/14/2024
5.3.3 11 08/24/2024
5.3.2 7 08/03/2025
5.3.1 5 09/13/2025
5.2.8 42 01/01/2024
5.2.7 6 09/13/2025
5.2.6 7 08/03/2025
5.2.5 6 06/26/2025
5.2.4 5 09/13/2025
5.2.3 5 09/13/2025
5.2.2 5 06/26/2025
5.2.1 6 09/13/2025
5.2.0 6 09/13/2025
5.1.5 7 06/26/2025
5.1.4 3 10/27/2025
5.1.3 4 10/27/2025
5.1.2 6 09/13/2025
5.1.1 6 06/26/2025
5.1.0 6 08/03/2025
5.0.5 7 06/26/2025
5.0.4 4 10/27/2025
5.0.3 5 09/13/2025
5.0.2 6 09/13/2025
5.0.1 6 08/03/2025
5.0.0 6 06/26/2025
4.7.15 6 07/31/2025
4.7.14 6 07/31/2025
4.7.13 7 07/31/2025
4.7.12 8 02/27/2025
4.7.11 11 01/15/2025
4.7.10 88 05/20/2021
4.7.9 52 03/25/2021
4.7.8 29 03/01/2021
4.7.7 5 06/26/2025
4.7.6 5 09/13/2025
4.7.5 7 05/24/2021
4.7.4 7 06/26/2025
4.7.3 6 08/03/2025
4.7.2 6 08/03/2025
4.7.1 5 08/03/2025
4.7.0 6 08/03/2025
4.6.8 5 09/13/2025
4.6.7 5 09/13/2025
4.6.6 6 06/26/2025
4.6.5 5 09/13/2025
4.6.4 6 06/26/2025
4.6.3 5 08/03/2025
4.6.2 7 08/03/2025
4.6.1 6 08/03/2025
4.6.0 5 09/13/2025
4.5.11 6 07/31/2025
4.5.10 5 09/13/2025
4.5.9 5 09/13/2025
4.5.8 5 09/13/2025
4.5.7 6 08/03/2025
4.5.6 5 09/13/2025
4.5.5 6 06/26/2025
4.5.4 7 06/26/2025
4.5.3 6 09/13/2025
4.5.2 6 09/13/2025
4.5.1 7 08/03/2025
4.5.0 4 10/27/2025
4.4.13 6 07/31/2025
4.4.12 7 07/31/2025
4.4.11 6 07/31/2025
4.4.10 7 07/31/2025
4.4.9 7 06/26/2025
4.4.8 6 06/26/2025
4.4.7 8 06/26/2025
4.4.6 6 06/26/2025
4.4.5 7 06/26/2025
4.4.4 8 06/26/2025
4.4.3 7 06/26/2025
4.4.2 6 06/26/2025
4.4.1 6 06/26/2025
4.4.0 7 06/26/2025
4.3.11 5 09/13/2025
4.3.10 6 07/31/2025
4.3.9 5 09/13/2025
4.3.8 6 09/13/2025
4.3.7 6 08/03/2025
4.3.6 6 08/03/2025
4.3.5 5 09/13/2025
4.3.4 9 06/26/2025
4.3.3 8 06/26/2025
4.3.2 5 09/13/2025
4.3.1 5 09/13/2025
4.3.0 6 09/13/2025
4.2.3 5 09/13/2025
4.2.2 6 06/26/2025
4.2.1 6 09/13/2025
4.2.0 5 08/03/2025
4.1.2 6 09/13/2025
4.1.1 5 06/26/2025
4.1.0 5 08/03/2025
4.0.1 5 09/13/2025
4.0.0 7 06/26/2025
3.2.1 4 10/27/2025
3.2.0 7 08/03/2025
3.1.0 5 09/13/2025
3.0.0 7 06/26/2025
2.1.0 6 08/03/2025
2.0.1.2 8 06/26/2025
2.0.0.2000 8 06/26/2025
1.0.0.505 5 09/12/2025