github NLog/NLog v4.7
NLog 4.7

latest releases: v5.3.4, v5.3.3, v5.3.2...
4 years ago

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)
  • #3830 Faster assignment of properties accessed through reflection (@304NotModified)
  • #3832 ${replace} - Faster search and replace when not explicitly have requested regex support (@snakefoot)
  • #3828 Skip need for Activator.CreateInstance in DbTypeSetter (@304NotModified)

Don't miss a new NLog release

NewReleases is sending notifications on new releases.