All Versions
86
Latest Version
Avg Release Cycle
29 days
Latest Release
47 days ago

Changelog History
Page 1

  • v4.7.2

    May 18, 2020

    🛠 Bugfixes

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

    👌 Improvements

  • v4.7.1

    May 15, 2020

    🔋 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)
  • v4.7

    March 20, 2019

    🔋 Features

    • 🔧 #3686 + #3740 LogManager.Setup() allows fluent configuration of LogFactory options (@snakefoot + @304NotModified)
    • 0️⃣ #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)
    • 0️⃣ #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)
    • 0️⃣ #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)
  • v4.6.8

    November 04, 2019

    🛠 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)
  • v4.6.7

    August 25, 2019

    🔋 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

    🐎 Performance

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

    July 14, 2019

    🔋 Features

    🐎 Performance

  • v4.6.5

    June 13, 2019

    🛠 Bugfixes

    🔋 Features

    👌 Improvements

    🐎 Performance

    • 👍 #3444 RetryingMultiProcessFileAppender - better init BufferSize (@snakefoot)
  • v4.6.4

    May 28, 2019

    🛠 Bugfixes

    • 0️⃣ NLog.Schema: Added missing defaultAction attribute on filters element in XSD (@304NotModified)
    • AsyncWrapper in Blocking Mode can cause deadlock (@snakefoot)

    🔋 Features

    👌 Improvements

    🐎 Performance

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

  • v4.6.3

    April 30, 2019

    🛠 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)
    • 0️⃣ #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