Skip to content
This repository was archived by the owner on Oct 25, 2025. It is now read-only.

Conversation

@dependabot
Copy link

@dependabot dependabot bot commented on behalf of github Aug 1, 2025

Updated NLog from 5.4.0 to 6.0.2.

Release notes

Sourced from NLog's releases.

6.0.2

  • #​5930 XmlParser - Handle XML comments after root-end-tag. (@​snakefoot)
  • #​5929 XmlLoggingConfiguration - Improve handling of invalid XML. (@​snakefoot)
  • #​5933 Handle invalid message template when skipping parameters array. (@​snakefoot)
  • #​5915 ReplaceNewLinesLayoutRendererWrapper - Replace more line ending characters. (@​oikku)
  • #​5911 NLog.Targets.GZipFile - Improve support for ArchiveAboveSize. (@​snakefoot)
  • #​5921 FileTarget - Activate legacy ArchiveFileName when ArchiveSuffixFormat contains legacy placeholder. (@​snakefoot)
  • #​5924 AsyncTargetWrapper - Updated FullBatchSizeWriteLimit default value from 5 to 10. (@​snakefoot)
  • #​5937 Mark Assembly loading with RequiresUnreferencedCodeAttribute for AOT. (@​snakefoot)
  • #​5938 Logger - Align WriteToTargets with WriteToTargetsWithSpan. (@​snakefoot)
  • #​5909 ConfigurationItemFactory - Added extension hints for webservice and activityid. (@​snakefoot)
  • #​5918 Log4JXmlTarget - Removed alias NLogViewer as conflicts with other nuget-packages. (@​snakefoot)
  • #​5926 SplunkTarget - NetworkTarget with SplunkLayout. (@​snakefoot)
  • #​5927 GelfLayout - Align with SplunkLayout. (@​snakefoot)
  • #​5913 NLog.Targets.Network - Updated nuget-package README.md. (@​snakefoot)
  • #​5912 NLog.Targets.Trace - Updated nuget-package README.md. (@​snakefoot)
  • #​5919 XML docs for Targets and Layouts with remarks about default value. (@​snakefoot)
  • #​5922 XML docs for LayoutRenderers with remarks about default value. (@​snakefoot)
  • #​5925 XML docs for Target Wrappers with remarks about default value. (@​snakefoot)
  • #​5935 Improve NLog XSD Schema with better handling of typed Layout. (@​snakefoot)
  • #​5923 Updated unit-tests from NET6 to NET8. (@​snakefoot)

6.0.1

Improvements

  • #​5898 Changed ConditionExpression to be nullable by default since no Condition means no filtering. (@​snakefoot)
  • #​5906 Include ConditionExpression in the static type registration. (@​snakefoot)
  • #​5895 Fixed the new XML parser to handle XML comments just before end-tag. (@​snakefoot)
  • #​5905 Fixed the new XML parser to allow InnerText with greater-than characters. (@​snakefoot)
  • #​5891 Updated NLog.Targets.AtomicFile to support net8.0-windows without dependency on Mono.Posix.NETStandard. (@​snakefoot)

6.0.0

Major changes:

  • Support Ahead-of-Time (AOT) builds without warnings
  • Support Nullable references
  • Support ReadOnlySpan to reduce memory allocations
  • LogFactory supports FlushAsync and IDisposableAsync
  • FileTarget removed support for ConcurrentWrites
  • FileTarget refactored file-archive-logic with ArchiveSuffixFormat

NLog v6 has reduced its footprint by extracting features into separate nuget-packages:

List of all NLog 6.0 Pull Requests

See also List of major changes in NLog v6 for more details.

Thanks to all contributers: @​ana1250, @​Pavan8374, @​smnsht, @​RomanSoloweow, @​wadebaird, @​hangy, @​lavige777, @​jokoyoski, @​saltukkos, @​nih0n, @​michaelplavnik, @​Aaronmsv, @​ShadowDancer, @​Orace, @​tvogel-nid, @​martinzding, @​kurnakovv, @​dance, @​JohnVerheij

6.0.0-rc4

Improvements

  • Mark struct as readonly to allow compiler optimization
  • RegisterObjectTransformation to preserve public properties
  • Log4JXmlEventLayout - Enforce MaxRecursionLimit = 0
  • DatabaseTarget with support for AOT (@​JohnVerheij)
  • DatabaseTarget only assign ConnectionString when specified (@​JohnVerheij)

6.0.0-rc3

Improvements

  • Log4JXmlEventLayout - Fixed IncludeEmptyValue for Parameters

6.0.0-rc2

Improvements

  • Fixed NLog XmlParser to support XML comments within XML processing instructions.
  • NLog.Targets.Network now also supports NET35.
  • Updated structs to be readonly to allow compiler optimizations.
  • Updated interface ILoggingConfigurationElement to support nullable Values.
  • Updated all projects to include <IsAotCompatible>
  • Optimized ConsoleTarget to not use Console.WriteLine, and introduced option ForceWriteLine
  • Added new LogEventInfo constructor that supports ReadOnlySpan<MessageTemplateParameter>
  • Updated NLog.Schema nuget-package to include targets-file to copy NLog.xsd to project-folder.
  • Improved configuration-file loading to advise about NLog nuget-packages for missing types.

6.0.0-rc1

Improvements

  • Updated NLog API with <Nullable>enable</Nullable> and introduced Layout.Empty
  • Marked [RequiredParameter] as obsolete, and replaced with explicit option validation during initialization.
  • Marked LogEventInfo.SequenceID and ${sequenceid} as obsolete, and instead use ${counter:sequence=global}.
  • Added support for params ReadOnlySpan when using C# 13
  • Prioritize generic Logger-methods by marking legacy methods with [OverloadResolutionPriority(-1)] when using C# 13
  • Skip LogEventInfo.Parameters-array-allocation when unable to defer message-template formatting.
  • Renamed ChainsawTarget to Log4JXmlTarget to match Log4JXmlEventLayout
  • Updated NLog.Schema to include intellisense for multiple NLog-assemblies.

Unless something bad is discovered, then this will be the last preview build, before the final release of NLog v6.0

Updated NLog v6.0 release notes: https://nlog-project.org/2025/04/29/nlog-6-0-major-changes.html

6.0.0-preview1

Major Changes

  • Support AOT builds without build warnings.
  • New FileTarget without ConcurrentWrites support, but still support KeepFileOpen (true/false).
  • Moved old FileTarget into the new nuget-package NLog.Targets.ConcurrentFile.
  • Created new nuget-package NLog.Targets.AtomicFile that supports ConcurrentWrites for NET8 on both Windows / Linux.
  • Created new nuget-package NLog.Targets.GZipFile that uses GZipStream for writing directly to compressed files.
  • Moved MailTarget into the new nuget-package NLog.Targets.Mail.
  • Moved NetworkTarget into the new nuget-package NLog.Targets.Network.
  • New GelfTarget introduced for the new nuget-package NLog.Targets.Network.
  • New SyslogTarget introduced for the new nuget-package NLog.Targets.Network.
  • Moved TraceTarget and NLogTraceListener into the new nuget-package NLog.Targets.Trace.
  • Moved WebServiceTarget into the new nuget-package NLog.Targets.WebService
  • Removed dependency on System.Text.RegularExpressions and introduced new nuget-package NLog.RegEx.
  • Removed dependency on System.Xml.XmlReader by implementing own internal basic XML-Parser.

NLog v6.0 release notes: https://nlog-project.org/2025/04/29/nlog-6-0-major-changes.html

List of all NLog 6.0 Pull Requests

Thanks to all contributers: @​ana1250, @​Pavan8374, @​smnsht, @​RomanSoloweow, @​wadebaird, @​hangy, @​lavige777, @​jokoyoski, @​saltukkos, @​nih0n, @​michaelplavnik, @​Aaronmsv, @​ShadowDancer, @​Orace, @​tvogel-nid, @​martinzding, @​kurnakovv

5.5.1

  • #​5858 ConsoleTarget - Added ForceWriteLine to match NLog v6 Schema (@​snakefoot)
  • #​5866 Layout.FromLiteral to match NLog v6 (@​snakefoot)
  • #​5888 ChainsawTarget with type-alias Log4JXml to match NLog v6 (@​snakefoot)
  • #​5883 AsyncTargetWrapper - LogEventDropped and EventQueueGrow events fixes (@​dance)
  • #​5890 StringBuilderExt - Change Append2DigitsZeroPadded to array-lookup (@​snakefoot)
  • #​5936 XmlLayout - Support MaxRecursionLimit == 0 (@​snakefoot)
  • #​5936 RegisterObjectTransformation so build trimming will keep public properties (@​snakefoot)

5.5.0

Improvements

  • #​5710 Restored LogFactory.Setup().SetupFromEnvironmentVariables() as not obsolete (#​5710) @​snakefoot
  • #​5717 Avoid using MakeGenericType for Dictionary enumeration when AOT (#​5717) @​snakefoot
  • #​5730 Stop using obsolete Assembly.CodeBase for NetStandard (#​5730) @​snakefoot
  • #​5742 ExceptionLayoutRenderer - Handle Exception properties like StackTrace can throw with AOT (#​5742) @​snakefoot
  • #​5743 ExceptionLayoutRenderer - Handle Data-collection-item ToString can throw with AOT (#​5743) @​snakefoot
  • #​5763 ExceptionLayoutRenderer - Handle Exception-properties can throw with AOT (#​5763) @​snakefoot
  • #​5756 ServiceRepository - Improve exception-handling when resolving service-types while disposing (#​5756) @​snakefoot
  • #​5759 LayoutRenderer - Optimize performance by skipping cache result from render Inner Layout (#​5759) @​snakefoot
  • #​5795 ConditionLayoutExpression - Optimize performance by skipping cache result from render Inner Layout (#​5795) @​snakefoot
  • #​5731 Mark IFactory RegisterType as obsolete, since it will be removed with NLog v6 (#​5731) @​snakefoot
  • #​5766 Mark JsonLayout EscapeForwardSlash as obsolete, since disabled with NLog v6 (#​5766) @​snakefoot
  • #​5823 Mark ExceptionLayoutRenderer Formats-List as obsolete, since immutable with NLog v6 (#​5823) @​snakefoot
  • #​5769 Updated API-code examples to not depend on obsolete SimpleConfigurator (#​5769) @​snakefoot
  • #​5776 ObjectReflectionCache - Handle PropertyValue can throw with AOT (#​5776) @​snakefoot
  • #​5780 NetworkTarget - Introduced option NoDelay to disable delayed ACK (#​5780) @​snakefoot
  • #​5788 Fix InternalLogger noise about reflection for FuncLayoutRenderer (#​5788) @​snakefoot
  • #​5792 TargetWithContext - Reduce allocation for RenderLogEvent when SimpleLayout (#​5792) @​snakefoot
  • #​5810 Refactoring to improve null value handling (#​5810) @​snakefoot
  • #​5812 Refactoring to improve null value handling (#​5812) @​snakefoot
  • #​5817 LoggingConfigurationParser - Prioritize LoggingRules from current config (#​5817) @​snakefoot
  • #​5825 WhenEmptyLayoutRendererWrapper - Optimize IStringValueRenderer Logic (#​5825) @​snakefoot

Commits viewable in compare view.

Updated NLog.Config from 4.3.1 to 4.7.15.

Release notes

Sourced from NLog.Config's releases.

4.7.15

Improvements

  • #​4836 Fixed missing initialization of layout-parameters for ConditionMethodExpression (#​4836) (@​snakefoot)
  • #​4821 LogEventInfo - Optimize copy messageTemplateParameters by caching Count (#​4821) (@​snakefoot)
  • #​4820 Improve loading of AppName.exe.nlog with .NET6 single file publish (#​4820) (@​snakefoot)
  • #​4806 NLogConfigurationException - Skip string.Format when no args (#​4806) (@​snakefoot)

4.7.14

Improvements

  • #​4799 Added IncludeEventProperties + IncludeScopeProperties to improve transition (#​4799) (@​snakefoot)
  • #​4786 Refactored code to remove false positives from code analysis (#​4786) (@​snakefoot)

4.7.13

Bugfixes

  • #​4700 AsyncTargetWrapper - Fix performance for OverflowAction Block on NetCore (#​4700) (@​snakefoot)
  • #​4644 AsyncTargetWrapper - Swallow OutOfMemoryException instead of crashing (#​4644) (@​snakefoot)

Improvements

  • #​4649 Fix broken XML doc comment (#​4649) (@​GitHubPang)

New Contributors

4.7.12

Bugfixes

  • #​4627 PropertiesDictionary - Fixed threading issue in EventProperties (#​4627) (@​snakefoot)
  • #​4631 FileTarget - Failing to CleanupInitializedFiles should not stop logging (#​4631) (@​snakefoot)

Features

  • #​4629 LogEventInfo constructor with eventProperties as IReadOnlyList (#​4629) (@​snakefoot)

4.7.11

Bugfixes

  • #​4519 JsonSerializer - Fix CultureNotFoundException with Globalization Invariant Mode (#​4519) (@​snakefoot)

Features

  • #​4475 WebServiceTarget - Added support for assigning UserAgent-Header (#​4475) (@​snakefoot)

4.7.10

Bugfixes

  • #​4401 JsonSerializer - Fixed bug when handling custom IConvertible returning TypeCode.Empty (#​4401) (@​snakefoot)

Improvements

  • #​4391 Support TargetDefaultParameters and TargetDefaultWrapper (#​4391) (@​snakefoot)
  • #​4403 JsonLayout - Apply EscapeForwardSlash for LogEventInfo.Properties (#​4403) (@​snakefoot)
  • #​4393 NLog.Config package: Updated hyperlink (#​4393) (@​snakefoot)

4.7.9

Bugfixes

  • #​4349 Fixed TrimDirectorySeparators to not use the root-path on Linux (#​4349) (@​snakefoot)
  • #​4353 Fixed FileTarget archive cleanup within same folder at startup (#​4353) (@​snakefoot)
  • #​4352 Fixed FileTarget archive cleanup when using short filename (#​4352) (@​snakefoot)

Improvements

  • #​4326 Make it possible to extend the FuncLayoutRenderer (#​4326) (@​304NotModified)
  • #​4369 + #​4375 LoggingConfigurationParser - Recognize LoggingRule.FilterDefaultAction (#​4369 + #​4375) (@​snakefoot)

Performance

  • #​4337 JsonLayout - Avoid constant string-escape of JsonAttribute Name-property (#​4337) (@​snakefoot)

4.7.8

Bugfixes

  • #​4316 Fix TrimDirectorySeparators to handle root-path on Windows and Linux to load Nlog.config from root-path (#​4316) (@​snakefoot)

Improvements

  • #​4273 Handle Breaking change with string.IndexOf(string) in .NET 5 (#​4273) (@​snakefoot)
  • #​4301 Update docs, remove ArrayList in docs (#​4301) (@​304NotModified)

4.7.7

Bugfixes

  • #​4229 Skip lookup MainModule.FileName on Android platform to avoid crash (#​4229) (@​snakefoot)
  • #​4202 JsonLayout - Generate correct json for keys that contain quote (#​4202) (@​virgilp)
  • #​4245 JsonLayout - Unwind after invalid property value to avoid invalid Json (#​4245) (@​snakefoot)

Improvements

  • #​4222 Better handling of low memory (#​4222) (@​snakefoot)
  • #​4221 JsonLayout - Added new ExcludeEmptyProperties to skip GDC/MDC/MLDC properties with null or empty values (#​4221) (@​pruiz)

Performance

  • #​4207 Skip allocation of SingleCallContinuation when ThrowExceptions = false (#​4207) (@​snakefoot)

4.7.6

Bugfixes

  • #​4142 JsonSerializer - Ensure invariant formatting of DateTimeOffset (#​4142) (@​snakefoot)
  • #​4172 AsyncTaskTarget - Flush when buffer is full should not block forever (#​4172) (@​snakefoot)
  • #​4182 Failing to lookup ProcessName because of Access Denied should fallback to Win32-API (#​4182) (@​snakefoot)

Features

  • #​4153 ExceptionLayoutRenderer - Added FlattenException option (#​4153) (@​snakefoot)

Improvements

  • #​4141 NetworkTarget - Improve handling of synchronous exceptions from UdpClient.SendAsync (#​4141) (@​snakefoot)
  • #​4176 AsyncTaskTarget - Include TaskScheduler in ContinueWith (#​4176) (@​snakefoot)
  • #​4190 Improving debugger-display for Logger.Properties and LogEventInfo.Properties (@​snakefoot)

Performance

  • #​4132 Improve thead concurrency when using wrapper cached=true (#​4132) (@​snakefoot)
  • #​4171 ConditionLayoutExpression - Skip allocating StringBuilder for every condition check (#​4171) (@​snakefoot)

4.7.5

Bugfixes

  • #​4106 FileTarget - New current file should write start header, when archive operation is performed on previous file (#​4106) (@​snakefoot)

Improvements

  • #​4102 LoggingConfiguration - ValidateConfig should only throw when enabled (#​4102) (@​snakefoot)
  • #​4114 Fix VerificationException Operation could destabilize the runtime (#​4114) (@​snakefoot)

Performance

  • #​4115 Removed EmptyDefaultDictionary from MappedDiagnosticsContext (#​4115) (@​snakefoot)

Other

  • #​4109 Fix root .editorconfig to use end_of_line = CRLF. Remove local .editorconfig (#​4109) (@​snakefoot)
  • #​4097 Improve docs (#​4097) (@​304NotModified)

4.7.4

Features

  • #​4076 DatabaseTarget - Added AllowDbNull for easier support for nullable parameters (#​4076) (@​snakefoot)

Bugfixes

  • #​4069 Fluent LogBuilder should suppress exception on invalid callerFilePath (#​4069) (@​snakefoot)

Improvements

  • #​4073 FileTarget - Extra validation of the LogEvent-timestamp before checking time to archive (#​4073) (@​snakefoot)
  • #​4068 FileTarget - Improve diagnostic logging to see reason for archiving (@​snakefoot)

4.7.3

Features

  • #​4017 Allow to change the RuleName of a LoggingRule (#​4017) (@​304NotModified)
  • #​3974 logging of AggregrateException.Data to prevent it from losing it after Flatten call (#​3974) (@​chaos0307)

Bugfixes

  • #​4011 LocalIpAddressLayoutRenderer - IsDnsEligible and PrefixOrigin throws PlatformNotSupportedException on Linux (#​4011) (@​snakefoot)

Improvements

  • #​4057 ObjectReflectionCache - Reduce noise from properties that throws exceptions like Stream.ReadTimeout (#​4057) (@​snakefoot)
  • #​4053 MessageTemplates - Changed Literal.Skip to be Int32 to support message templates longer than short.MaxValue (#​4053) (@​snakefoot)
  • #​4043 ObjectReflectionCache - Skip reflection for Stream objects (#​4043) (@​snakefoot)
  • #​3999 LogFactory Shutdown is public so it can be used from NLogLoggerProvider (#​3999) (@​snakefoot)
  • #​3972 Editor config with File header template (#​3972) (@​304NotModified)

Performance

  • #​4058 FileTarget - Skip delegate capture in GetFileCreationTimeSource. Fallback only necessary when appender has been closed. (#​4058) (@​snakefoot)
  • #​4021 ObjectReflectionCache - Reduce initial memory allocation until needed (#​4021) (@​snakefoot)
  • #​3977 FilteringTargetWrapper - Remove delegate allocation (#​3977) (@​snakefoot)

4.7.2

Bugfixes

  • #​3969 FileTarget - ArchiveOldFileOnStartup not working together with ArchiveAboveSize (@​snakefoot)

Improvements

  • #​3962 XSD: Added Enabled attribute for (@​304NotModified)

4.7.1

Features

  • #​3871 LogManager.Setup().LoadConfigurationFromFile("NLog.config") added to fluent setup (@​snakefoot + @​304NotModified)
  • #​3909 LogManager.Setup().GetCurrentClassLogger() added to fluent setup (@​snakefoot + @​304NotModified)
  • #​3861 LogManager.Setup().SetupInternalLogger(s => s.AddLogSubscription()) added to fluent setup (@​snakefoot + @​304NotModified)
  • #​3891 ColoredConsoleTarget - Added Condition option to control when to do word-highlight (@​snakefoot)
  • #​3915 Added new option CaptureStackTrace to ${stacktrace} and ${callsite} to skip implicit capture by Logger (@​snakefoot)
  • #​3940 Exception-LayoutRenderer with new option BaseException for rendering innermost exception (@​snakefoot)

Improvements

  • #​3857 FileTarget - Batch write to filestream in max chunksize of 100 times BufferSize (@​snakefoot)
  • #​3867 InternalLogger include whether NLog comes from GlobalAssemblyCache when logging NLog version (@​snakefoot)
  • #​3862 InternalLogger LogToFile now support ${processdir} to improve support for single-file-publish (@​snakefoot)
  • #​3877 Added ${processdir} that matches ${basedir:processDir=true} for consistency with InternalLogger (@​snakefoot)
  • #​3881 Object property reflection now support IReadOnlyDictionary as expando object (@​snakefoot)
  • #​3884 InternalLogger include more details like FilePath when loading NLog.config file (@​snakefoot)
  • #​3895 Added support for Nullable when doing conversion of property types (@​304NotModified)
  • #​3896 InternalLogger Warnings when skipping unrecognized LayoutRenderer options (@​snakefoot)
  • #​3901 MappedDiagnosticsLogicalContext - SetScoped with IReadOnlyList also for Xamarin (@​snakefoot)
  • #​3904 Object property reflection automatically performs ToString for System.Reflection.Module (@​snakefoot)
  • #​3921 Improve ${basedir:fixtempdir=true} to work better on Linux when TMPDIR not set (@​snakefoot)
  • #​3928 NetworkTarget respect MaxQueueSize for http- / https-protocol (@​snakefoot)
  • #​3930 LogFactory.LoadConfiguration() reports searched paths when throwing FileNotFoundException (@​304NotModified)
  • #​3949 ReplaceNewLines-LayoutRenderer will also remove windows newlines on the Linux platform (@​Silvenga)

Bugfixes

  • #​3868 SplitGroup Target Wrapper should not skip remaining targets when single target fails (@​snakefoot)
  • #​3918 ColoredConsoleTarget - Fix bug in handling of newlines without word-highlight (@​snakefoot)
  • #​3941 ${processid} will no longer fail because unable to lookup ${processdir} on Mono Android (@​snakefoot)

Performance

  • #​3855 FileTarget - Skip checking file-length when only using ArchiveEvery (@​snakefoot)
  • #​3898 ObjectGraphScanner performs caching of property reflection for NLog config items (@​snakefoot)
  • #​3894 Condition expressions now handles operator like '==' without memory boxing (@​snakefoot)
  • #​3903 ObjectGraphScanner should only check for layout-attributes on Layouts and LayoutRenderers (@​snakefoot)
  • #​3902 MessageTemplate parsing of properties skips unnecessary array allocation (@​snakefoot)

4.7

Features

  • #​3686 + #​3740 LogManager.Setup() allows fluent configuration of LogFactory options (@​snakefoot + @​304NotModified)
  • #​3610 LogManager.Setup().SetupSerialization(s => s.RegisterObjectTransformation(...)) for overriding default property reflection (@​snakefoot + @​304NotModified + @​Giorgi + @​mmurrell)
  • #​3787 LogManager.Setup().SetupExtensions(s => s.RegisterConditionMethod(...)) can use lambda methods and not just static methods (@​snakefoot)
  • #​3713 ${level:format=FullName} will expand Info + Warn to their full name (@​snakefoot)
  • #​3714 + #​3734 FileTarget - Supports MaxArchiveDays for cleanup of old files based on their age (@​snakefoot)
  • #​3737 + #​3769 Layout.FromMethod to create Layout directly from a lambda method (@​snakefoot)
  • #​3771 Layout.FromString to create Layout directly from string along with optional parser validation (@​snakefoot)
  • #​3793 ${dir-separator} for rendering platform specific directory path separator (@​304NotModified)
  • #​3755 FileTarget - Supports ArchiveOldFileOnStartupAboveSize for cleanup of existing file when above size (@​Sam13)
  • #​3796 + #​3823 InternalLogger - Added LogMessageReceived event (@​304NotModified + @​snakefoot)
  • #​3829 DatabaseTarget - Assign connection properties like SqlConnection.AccessToken (@​304NotModified + @​snakefoot)
  • #​3839 DatabaseTarget - Assign command properties like SqlCommand.CommandTimeout (@​snakefoot)
  • #​3833 ${onHasProperties} for only rendering when logevent includes properties from structured logging (@​snakefoot)

Improvements

  • #​3521 XmlLoggingConfiguration - Marked legacy constructors with ignoreErrors parameter as obsolete (@​snakefoot)
  • #​3689 LoggingConfiguration - Perform checking of unused targets during initialization for better validation (@​snakefoot)
  • #​3704 EventLogTarget - Improve diagnostics logging when using dynamic EventLog source (@​snakefoot)
  • #​3706 ${longdate} now also supports raw value for use as DatabaseTarget parameter with DbType (@​snakefoot)
  • #​3728 SourceLink for GitHub for easy debugging into the NLog source code (@​304NotModified)
  • #​3743 JsonLayout - EscapeForwardSlash now automatically applies to sub-attributes (@​snakefoot)
  • #​3742 TraceTarget - Introduced EnableTraceFail=false to avoid Environment.FailFast (@​snakefoot)
  • #​3750 ExceptionLayoutRenderer - Improved error message when Format-token parsing fails (@​snakefoot)
  • #​3747 AutoFlushWrapper - Set AutoFlush=false for AsyncTaskTarget by default (@​snakefoot)
  • #​3754 LocalIpAddressLayoutRenderer - Higher priority to network-addresses that has valid gateway adddress (@​snakefoot)
  • #​3762 LogFactory - Flush reports to InternalLogger what targets produces timeouts (@​snakefoot)

Bugfixes

  • #​3758 LogFactory - Fix deadlock issue with AutoReload (@​snakefoot)
  • #​3766 JsonLayout - Fixed ThreadAgnostic to correctly capture context when using nested JsonLayout (@​snakefoot)
  • #​3700 ExceptionLayoutRenderer - Fixed so Format option HResult also works for NetCore (@​snakefoot)
  • #​3761 + #​3784 Log4JXml Layout will render NDLC + NDC scopes in correct order (@​adanek + @​304NotModified)
  • #​3821 Logger - Added exception handler for CallSite capture for platform that fails to capture StackTrace (@​snakefoot)
  • #​3835 StringSplitter - Fixed quote handling when reading elements for config list-properties (@​snakefoot)
  • #​3828 Utilities: fix ConversionHelpers.TryParseEnum for white space (@​304NotModified)

Performance

  • #​3683 ObjectGraphScanner - Avoid holding list.SyncRoot lock while scanning (@​snakefoot)
  • #​3691 FileTarget - ConcurrentWrites=true on NetCore now much faster when archive enabled (@​snakefoot)
  • #​3694 + #​3705 JsonConverter - Write DateTime directly without string allocation (@​snakefoot)
  • #​3692 XmlLayout - Removed unnecessary double conversion to string (@​snakefoot)
  • #​3735 WebServiceTarget - Reduced memory allocations by removing unnecessary delegate capture (@​snakefoot)
  • #​3739 NetworkTarget - Reduced memory allocation for encoding into bytes without string allocation (@​snakefoot)
  • #​3748 AsyncTaskTarget - Skip default AsyncWrapper since already having internal queue (@​snakefoot)
  • #​3767 Mark Condition Expressions as ThreadSafe to improve concurrency in Layouts (@​snakefoot)
  • #​3764 DatabaseTarget - Added IsolationLevel option that activates transactions for better batching performance (@​snakefoot)
  • #​3779 SimpleLayout - Assignment of string-reference with null-value will translate into FixedText (@​304NotModified)
  • #​3790 AsyncWrapper - Less aggressive with scheduling timer events for background writing (@​snakefoot)
    ... (truncated)

4.7-rc1

See https://github.com/NLog/NLog/blob/master/CHANGELOG.md

4.6.8

Bugfixes

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

Features

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

Improvements

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

Performance

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

4.6.7

Features

  • #​3531 Added ${object-path} / ${exception:objectpath=PropertyName}, for rendering a property of an object (e.g. an exception) (#​3531) (@​304NotModified)
  • #​3560 WhenMethodFilter - Support dynamic filtering using lambda (#​3560) (@​snakefoot)
  • #​3184 Added support for dynamic layout renderer in log level filters (e.g. minLevel, maxLevel) (#​3184) (@​snakefoot)
  • #​3558 ExceptionLayoutRenderer - Added Source as new format parameter. (@​snakefoot)
  • #​3523 ColoredConsoleTarget - Added DetectOutputRedirected to skip coloring on redirect (@​snakefoot)

Improvements

  • #​3541 MessageTemplateParameters - Improve validation of parameters when isPositional (#​3541) (@​snakefoot)
  • #​3546 NetworkTarget - HttpNetworkSender no longer sends out-of-order (@​snakefoot)
  • #​3522 NetworkTarget - Fix InternalLogger.Trace to include Target name (#​3522) (@​snakefoot)
  • #​3562 XML config - Support ThrowConfigExceptions=true even when xml is invalid (@​snakefoot)
  • #​3532 Fix summary of NoRawValueLayoutRendererWrapper class (#​3532) (@​304NotModified)

Performance

  • #​3540 MessageTemplateParameters - Skip object allocation when no parameters (@​snakefoot)
  • #​3527 XmlLayout - Defer allocation of ObjectReflectionCache until needed (#​3527) (@​snakefoot)

4.6.6

Features

  • #​3514 Added XmlLoggingConfiguration(XmlReader reader) ctor, improved docs and annotations (@​dmitrychilli, @​304NotModified)
  • #​3513 AutoFlushTargetWrapper - Added FlushOnConditionOnly property (@​snakefoot)

Performance

  • #​3492 FileTarget - improvements when ConcurrentWrites=false (@​snakefoot)

4.6.5

Bugfixes

  • #​3476 Fix broken XSD schema - NLog.Schema package (@​snakefoot, @​304NotModified)

Features

  • #​3478 XSD: Support <value> in <variable> (@​304NotModified)
  • #​3477 ${AppSetting} - Added support for ConnectionStrings Lookup (@​snakefoot)
  • #​3469 LogLevel - Added support for TypeConverter (@​snakefoot)
  • #​3453 Added null terminator line ending for network target (@​Kahath)
  • #​3442 Log4JXmlEventLayout - Added IncludeCallSite + IncludeSourceInfo (@​snakefoot)

Improvements

  • #​3482 Fix typos in docs and comments (@​304NotModified)

Performance

  • #​3444 RetryingMultiProcessFileAppender - better init BufferSize (@​snakefoot)

4.6.4

Fixes

  • #​3392 NLog.Schema: Added missing defaultAction attribute on filters element in XSD (@​304NotModified)
  • #​3415 AsyncWrapper in Blocking Mode can cause deadlock (@​snakefoot)

Features

  • #​3430 Added "Properties" property on Logger for reading and editing properties.(@​snakefoot, @​304NotModified)
  • #​3423 ${all-event-properties}: Added IncludeEmptyValues option (@​304NotModified)
  • #​3394 ${when}, support for non-string values (@​304NotModified)
  • #​3398 ${whenEmpty} support for non-string values (@​snakefoot, @​304NotModified)
  • #​3391 Added ${environment-user} (@​snakefoot)
  • #​3389 Log4JXmlEventLayout - Added support for configuration of Parameters (@​snakefoot)
  • #​3411 LoggingConfigurationParser - Recognize LoggingRule.RuleName property (@​snakefoot)

Improvements

  • #​3393 Update package descriptions to note the issues with <PackageReference> (@​304NotModified)
  • #​3409 Various XSD improvements (NLog.Schema package) (@​304NotModified)

Performance

  • #​3398 ${whenEmpty} faster rendering of string values (@​snakefoot, @​304NotModified)
  • #​3405 FilteringTargetWrapper: Add support for batch writing (@​snakefoot, @​304NotModified)
  • #​3405 PostFilteringTargetWrapper: performance optimizations (@​snakefoot, @​304NotModified)
  • #​3435 Async / buffering wrapper: Improve performance when blocking (@​snakefoot)
  • #​3434 ObjectReflectionCache - Skip property-reflection for IFormattable (@​snakefoot)

4.6.3

Bugfixes

  • #​3345 Fixed potential memory issue and message duplication with large strings (@​snakefoot)
  • #​3316 TargetWithContext - serialize MDC and MDLC values properly (@​304NotModified)

Features

  • #​3298 Added WithProperty and SetProperty on Logger (@​snakefoot)
  • #​3329 ${EventProperties} - Added ObjectPath for rendering nested property (@​snakefoot, @​304NotModified)
  • #​3337 ${ShortDate} added support for IRawValue + IStringValueRenderer (@​snakefoot)
  • #​3328 Added truncate ambient property, e.g. ${message:truncate=80} (@​snakefoot)
  • #​3278 ConsoleTarget & ColoredConsoleTarget - Added AutoFlush and improve default flush behavior (@​snakefoot)

Improvements

  • #​3322 FileTarget - Introduced EnableFileDeleteSimpleMonitor without FileSystemWatcher for non-Windows (@​snakefoot)
  • #​3332 LogFactory - GetLogger should validate name of logger (@​snakefoot)
  • #​3320 FallbackGroupTarget - Fixed potential issue with WINDOWS_PHONE (@​snakefoot)
  • #​3261 NLog config file loading: use process name (e.g. applicationname.exe.nlog) when app.config is not available (@​snakefoot)

Performance

  • #​3311 Split string - avoid allocation of object array. Added StringHelpers.SplitAndTrimTokens (@​snakefoot)
  • #​3305 AppSettingLayoutRenderer - Mark as ThreadSafe and ThreadAgnostic (@​snakefoot)

Misc

  • #​3338 Update docs of various context classes (@​304NotModified)
  • #​3288 Move NLogPackageLoaders for better unittest debugging experience of NLog (@​304NotModified)
  • #​3274 Make HttpNetworkSender mockable, add unit test, introduce NSubsitute (@​304NotModified)
  • 10 pull requests with refactorings (@​snakefoot, @​304NotModified)

4.6.2

Bugfixes

  • #​3260 Fix escaping nested close brackets when parsing layout renderers (@​lobster2012-user)
  • #​3271 NLog config - Fixed bug where empty xml-elements were ignored (@​snakefoot, @​jonreis)

4.6.1

Bugfixes

  • #​3199 LoggingConfigurationParser - Fixed bug in handling of extensions prefix (@​snakefoot)
  • #​3253 Fix wrong warnings on <nlog> element (only wrong warnings) (#​3253) (@​snakefoot, @​304NotModified)
  • #​3195 SimpleStringReader: fix DebuggerDisplay value (#​3195) (@​lobster2012-user)
  • #​3198 XmlLayout - Fixed missing encode of xml element value (@​snakefoot)
  • #​3191 VariableLayoutRenderer - Fixed format-string for internal logger warning (@​snakefoot, @​lobster2012-user)
  • #​3258 Fix error with Embedded Assembly in LogAssemblyVersion (@​snakefoot)

Improvements

  • #​3255 Auto-flush on process exit improvements (@​snakefoot)
  • #​3189 AsyncTaskTarget - Respect TaskDelayMilliseconds on low activity (@​snakefoot)

Performance

  • #​3256 ${NDLC} + ${NDC} - Faster checking when TopFrames = 1 (@​snakefoot)
  • #​3201 ${GDC} reading is now lockfree (#​3201) (@​snakefoot)

4.6

See https://nlog-project.org/2019/03/20/nlog-4-6-is-live.html

Features

Main Feature

  • Database target: support for DbType for parameters (including SqlDbType) - #​2363 + #​2899 + #​3085 + #​3091 (@​hubo0831, @​ObikeDev, @​sorvis, @​304NotModified, @​snakefoot)

XML config features

  • Added support for constant variable in level attributes - #​2709 (level, minlevel, etc) (@​304NotModified)
  • Added defaultAction option for - #​2848 (@​304NotModified)
  • Rules now support multiple '*' and '?' wildcards and in any position - #​3098 (@​beppemarazzi)
  • Added Support ${currentdir}, ${basedir}, ${tempdir} and environment variables in internalLogFile value - #​3031 + #​3092 (@​snakefoot)

New targets, layouts and layout renderers

  • Added XmlLayout - Render LogEventInfo.Properties as XML - #​2670 + #​3014 (@​snakefoot)
  • Added ${db-null} layout renderer - #​2849 (@​304NotModified)
  • Added New ${substring}, ${left} & ${right} layoutrenderer wrappers - #​2907 (@​304NotModified)
  • Added ${HostName} Layout Renderer for full computer DNS name - #​3071 (@​amitsaha)
  • Added ${AppSetting} Layout Renderer (app.config + web.config) moved from NLog.Extended for NetFramework - #​3053 (@​snakefoot)
  • Added noRawValue layout wrapper - #​3165 (@​snakefoot)

Additions to targets, layouts and layout renderers

  • AsyncTargetWrapper: added LogEventDropped + LogEventQueueGrow events - #​2610 (@​Pomoinytskyi)
  • NetworkTarget - Support for SSL & TLS - #​2678 (@​snakefoot)
  • JsonLayout: support for System.Dynamic-objects - #​2902 (@​304NotModified)
  • AsyncTaskTarget: Added support for BatchSize and RetryCount - #​2909 (@​snakefoot)
  • ColoredConsoleTarget - Added EnableAnsiOutput option (VS Code support) - #​3018 (@​jp7677 + @​snakefoot)
  • Added IncludeGdc property in JsonLayout - #​3050 (@​casperc89)
  • TargetWithContext - Support for PropertyType using IRawValue-interface - #​3060 (@​snakefoot)

Enhancements

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

... (truncated)

4.6-rc3

Changes since RC2

Breaking

Oops, again a breaking change with the previous NLog 4.6 RC

  • Database target: dropped UseRawValue option on parameters (introduced in NLog 4.6 RC1), introduced ${myRenderer:noRawValue=true} (@​snakefoot)

Note, there are no breaking changes with NLog 4.5.11. Semver is important!

All changes NLog 4.6

Features

Main Feature

  • Database target: support for DbType for parameters (including SqlDbType) - #​2363 + #​2899 + #​3085 + #​3091 (@​hubo0831, @​ObikeDev, @​sorvis, @​304NotModified, @​snakefoot)

XML config features

  • Added support for constant variable in level attributes - #​2709 (level, minlevel, etc) (@​304NotModified)
  • Added defaultAction option for - #​2848 (@​304NotModified)
  • Rules now support multiple '*' and '?' wildcards and in any position - #​3098 (@​beppemarazzi)
  • Added Support ${currentdir}, ${basedir}, ${tempdir} and environment variables in internalLogFile value - #​3031 + #​3092 (@​snakefoot)

New targets, layouts and layout renderers

  • Added XmlLayout - Render LogEventInfo.Properties as XML - #​2670 + #​3014 (@​snakefoot)
  • Added ${db-null} layout renderer - #​2849 (@​304NotModified)
  • Added New ${substring}, ${left} & ${right} layoutrenderer wrappers - #​2907 (@​304NotModified)
  • Added ${HostName} Layout Renderer for full computer DNS name - #​3071 (@​amitsaha)
  • Added ${AppSetting} Layout Renderer (app.config + web.config) moved from NLog.Extended for NetFramework - #​3053 (@​snakefoot)
  • Added noRawValue layout wrapper - #​3165 (@​snakefoot)

Additions to targets, layouts and layout renderers

  • AsyncTargetWrapper: added LogEventDropped + LogEventQueueGrow events - #​2610 (@​Pomoinytskyi)
  • NetworkTarget - Support for SSL & TLS - #​2678 (@​snakefoot)
  • JsonLayout: support for System.Dynamic-objects - #​2902 (@​304NotModified)
  • AsyncTaskTarget: Added support for BatchSize and RetryCount - #​2909 (@​snakefoot)
  • ColoredConsoleTarget - Added EnableAnsiOutput option (VS Code support) - #​3018 (@​jp7677 + @​snakefoot)
  • Added IncludeGdc property in JsonLayout - #​3050 (@​casperc89)
  • TargetWithContext - Support for PropertyType using IRawValue-interface - #​3060 (@​snakefoot)

Enhancements

  • JsonLayout includes Type-property when rendering Exception-object - #​2989 (@​snakefoot)
  • LoggingConfigurationParser - Extracted from XmlLoggingConfiguration - #​2891 (Prepare for appsettings.json) (@​snakefoot)
    ... (truncated)

4.6-rc2

Changes since RC1

Breaking

Breaking changes since NLog 4.6 RC1, no breaking changes with 4.5.11

  • #​3131 DatabaseTarget - Removed logEvent-parameter from CreateDatabaseParameter (@​snakefoot)
  • #​3138 Split XML layout to XMLELement and XmlElementBase (#​3138) (@​304NotModified)

Features

  • #​3124 NetworkTarget - Added support for KeepAliveTimeSeconds (@​snakefoot)
  • #​3129 ConfigSetting - Preregister so it can be accessed without extension registration (#​3129) (@​snakefoot)

Improvements

  • #​3162 ContextProperty with IncludeEmptyValue means default value for ValueType (#​3162) (@​snakefoot)
  • #​3160 Refactor filetarget + target to reduce code complexity (@​snakefoot)
  • #​3159 AppSettingLayoutRenderer - Include Item for NLog.Extended (@​snakefoot)
  • #​3155 PlatformDetector - Introduced detection of MacOSX, and removed WindowsCE (@​snakefoot)
  • #​3144 TryGetRawValue instead of GetRawValue (@​304NotModified)
  • #​3141 AppSettingLayoutRenderer2 - Use Item instead of Name as it matches GDC + MDC + MDLC (#​3141) (@​snakefoot)
  • #​3121 All Hyperlinks to https (@​304NotModified)

All changes NLog 4.6

See https://github.com/NLog/NLog/blob/dev/CHANGELOG.md

4.6-rc1

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 (@​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 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 - 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.
    ... (truncated)

4.5.11

Enhancements

  • #​2985 LogBuilder - Support fluent assignment of message-template after properties (@​snakefoot)
  • #​2983 JsonSerializer - Use ReferenceEquals instead of object.Equals when checking for cyclic object loops (#​2983) (@​snakefoot)
  • #​2988 NullAppender - Added missing SecuritySafeCritical (@​snakefoot)

Fixes

  • #​2987 JSON encoding should create valid JSON for non-string dictionary-keys (@​snakefoot)

4.5.10

  • #​2883 Fix LoadConfiguration for not found config file (@​snakefoot, @​304NotModified)

4.5.9

Fixes

  • #​2865 JSON encoding should create valid JSON for special double values (hotfix) (@​snakefoot)

Enhancements

  • #​2846 Include Entry Assembly File Location when loading candidate NLog.config (#​2846) (@​snakefoot)

4.5.8

Features

  • #​2809 MethodCallTarget - Support for Lamba method (@​snakefoot)
  • #​2816 MessageTemplates - Support rendering of alignment + padding (@​snakefoot)

Fixes

  • #​2827 FileTarget - Failing to CreateArchiveMutex should not stop logging (@​snakefoot)
  • #​2830 Auto loading of assemblies was broken in some cases (@​snakefoot)

Enhancements

  • #​2814 LoggingConfiguration - Improves CheckUnusedTargets to handle target wrappers (@​snakefoot)

Performance

  • #​2817 Optimize LayoutRendererWrappers to reduce string allocations (#​2817) (@​snakefoot)

4.5.7

Features

  • #​2792 OutputDebugStringTarget - Support Xamarin iOS and Android (@​snakefoot)
  • #​2776 FileTarget - Introduced OpenFileFlushTimeout to help when AutoFlush = false (@​snakefoot)

Fixes

  • #​2761 ${Callsite} fix class naming when includeNamespace=false and cleanNamesOfAnonymousDelegates=true (@​Azatey)
  • #​2752 JSON: Fixes issue where char types are not properly escaped (#​2752) (@​smbecker)

Enhancements

  • #​2804 FileTarget - Do not trust Last File Write TimeStamp when AutoFlush=false (@​snakefoot)
  • #​2763 Throw better error when target name is null (@​masters3d)
  • #​2788 ${Assembly-version} make GetAssembly protected and virtual (@​alexangas)
  • #​2756 LongDateLayoutRenderer: Improve comments (@​stic)
  • #​2749 NLog.WindowsEventLog: Update dependency System.Diagnostics.EventLog to RTM version (@​304NotModified)

Performance

  • #​2797 Better performance with Activator.CreateInstance (@​tangdf)

4.5.6

Fixes

Enhancements

  • #​2745 FileTarget - Improve support for Linux FileSystem without BirthTime (@​snakefoot)

Performance

  • #​2744 LogEventInfo - HasProperties should allocate PropertiesDicitonary when needed (@​snakefoot)
  • #​2743 JsonLayout - Reduce allocations when needing to escape string (44% time improvement) (@​snakefoot)

4.5.5

Fixes

  • #​2736 FileTarget - Calculate correct archive date when multiple file appenders (@​snakefoot)

Features

  • #​2726 WhenRepeated - Support logging rules with multiple targets (@​snakefoot)
  • #​2727 Support for custom targets that implements IUsesStackTrace (@​snakefoot)
  • #​2719 DatabaseTarget: use parameters on install (@​Jejuni)

Enhancements

  • #​2718 JsonLayout - Always stringify when requested (@​snakefoot)
  • #​2739 Target.WriteAsyncLogEvents(IList) to public

Performance

  • #​2704 Allocation improvement in precalculating layouts (@​snakefoot)

4.5.4

Fixes

  • #​2688 Faulty invalidate of FormattedMessage when getting PropertiesDictionary (@​snakefoot)
  • #​2687 Fix: NLog.config build-action and copy for non-core projects, it's now "copy if newer" (@​304NotModified)
  • #​2698 FileTarget - Calculate correct archive date, when using Monthly archive (@​snakefoot)

Enhancements

  • #​2673 TargetWithContext - Easier to use without needing to override ContextProperties (@​snakefoot)
  • #​2684 DatabaseTarget - Skip static assembly lookup for .Net Standard (@​snakefoot)
  • ...

Description has been truncated

Bumps NLog from 5.4.0 to 6.0.2
Bumps NLog.Config from 4.3.1 to 4.7.15
Bumps NLog.Schema to 4.7.15, 6.0.2
Bumps System.Configuration.ConfigurationManager from 9.0.4 to 9.0.7

---
updated-dependencies:
- dependency-name: NLog
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: NLog.Config
  dependency-version: 4.7.15
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: NLog.Schema
  dependency-version: 4.7.15
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: NLog.Schema
  dependency-version: 6.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: System.Configuration.ConfigurationManager
  dependency-version: 9.0.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Aug 1, 2025
@dependabot dependabot bot mentioned this pull request Aug 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant