NLog

NLog - Advanced and Structured Logging for Various .NET Platforms

BSD-3-CLAUSE License

Stars
6.2K
Committers
209

Bot releases are visible (Hide)

NLog - NLog 5.0.2

Published by snakefoot about 2 years ago

Improvements

  • #5019 Layout Typed validates fixed values upfront at config initialization, instead of when logging (#5019) (@snakefoot)
  • #5026 Removed obsolete dependency Microsoft.Extensions.PlatformAbstractions (#5026) (@snakefoot)
  • #5016 WebServiceTarget - Verifies Url as RequiredParameter (#5016) (@snakefoot)
  • #5014 WebServiceTarget - Improve InternalLogging when Url is invalid (#5014) (@snakefoot)
  • #5010 GlobalDiagnosticsContext - Implicit caching of value lookup (#5010) (@snakefoot)
  • #5004 EventLogTarget - Bump default MaxMessageLength to 30000 to match limit in Win2008 (#5004) (@snakefoot)
  • #4995 Support UniversalTime = false when NLog time-source is UTC (#4995) (@snakefoot)
  • #4987 ConfigurationItemFactory - Include original type-alias when CreateInstance fails (#4987) (@snakefoot)
  • #4981 AssemblyVersionLayoutRenderer - Support override of Default value (#4981) (@snakefoot)
  • #4976 LoggingConfiguration - AddRule with overload for LoggingRule object (#4976) (@tvogel-nid)
NLog - NLog 5.0.1

Published by snakefoot over 2 years ago

Improvements

  • #4938 LoggingConfigurationParser should alert when LoggingRule filters are bad (#4938) (@snakefoot)
  • #4940 CompoundLayout with layout from config variable (#4940) (@snakefoot)
  • #4944 Mark Target LayoutWithLock as obsolete, since only temporary workaround (#4944) (@snakefoot)
  • #4950 FileTarget - First acquire file-handle to compress before creating zip-file (#4950) (@snakefoot)
  • #4953 FileTarget - Zip compression should not truncate when zip-file already exists (#4953) (@snakefoot)
  • #4965 Max StackTraceUsage should be computed using bitwise OR (#4965) (@martinzding)
  • #4963 Improved source-code documentation by fixing spelling errors (#4963) (@KurnakovMaksim)
NLog - NLog 5.0.0

Published by 304NotModified over 2 years ago

See Release post

Details of changes: See here

Major Features

  • NLog is now faster and lighter
  • NLog Layout for everything
  • NLog ScopeContext to replace MDC + MDLC + NDC + NDLC
  • NLog Layout stored as NLog Configuration Variables
  • Fluent API for NLog LoggingConfiguration
  • NLog Callsite from caller member attributes
  • LogFactory with Dependency Injection
  • Multiple type-aliases can be defined for targets, layouts, layout renderers and conditions
  • Parsing of type-alias will now ignore dashes (-)

Breaking Changes

See rationale here

  • Strong Version Changed
  • Obsolete methods have been removed
  • LoggingRule Filters DefaultAction changed to FilterResult.Ignore, that can cause NO output.
  • NLog.Extensions.Logging without any filter, that can give LOTS of unexpected output.
  • NLog.Extensions.Logging changes capture of EventId, so missing EventId_Id-property
  • NLog.Extensions.Logging makes NLog-section reserved in appsettings.json
  • NLog Extensions assemblies will not load automatically
  • NLog Targets extracted into their own nuget-packages
  • NLog DatabaseTarget extracted into its own NLog.Database nuget-package
  • NLog OutputDebugStringTarget extracted into its own NLog.OutputDebugString nuget-package
  • NLog PerformanceCounterTarget extracted into its own NLog.PerformanceCounter nuget-package
  • NLog ImpersonatingTargetWrapper extracted into its own NLog.WindowsIdentity nuget-package
  • NLog LogReceiverWebServiceTarget extracted into its own NLog.Wcf nuget-package
  • NLog PerformanceCounterLayoutRenderer extracted into its own NLog.PerformanceCounter nuget-package
  • NLog RegistryLayoutRenderer extracted into its own NLog.WindowsRegistry nuget-package
  • NLog WindowsIdentityLayoutRenderer extracted into its own NLog.WindowsIdentity nuget-package
  • Deprecated NLog.Extended nuget-package
  • Deprecated NLog.Config nuget-package
  • Xamarin, Windows Phone and Silverlight platforms replaced by .NET Standard
  • .NET Framework v4.0 platform replaced by .NET Framework v3.5 platform
  • Automatic loading of NLog.config now first check for exe.nlog
  • NLog Configuration will have KeepVariablesOnReload enabled by default
  • Layout and LayoutRenderer are now threadsafe by default
  • Default Layout for NLog Targets has been updated
  • Default Format for NLog Exception layoutrenderer has been updated
  • NLog InternalLogger will not initialize itself from app.config or environment variables
  • Removed obsolete method Target.Write(AsyncLogEventInfo[]) and OptimizeBufferReuse is always true
  • ScopeContext changes MappedDiagnosticContext (MDC) to use AsyncLocal
  • MappedDiagnosticContext (MDC), MappedDiagnosticLogicalContext (MDLC), GlobalDiagnosticContext (GDC) now case-insensitive
  • FileTarget KeepFileOpen = true by default
  • FileTarget ConcurrentWrites = false by default
  • FileTarget Encoding default value changed to UTF8
  • FileTarget will include BOM by default for UTF16 and UTF32 encoding
  • NetworkTarget will Discard by default on overflow
  • JsonLayout MaxRecursionLimit default value changed to 1
  • JsonLayout EscapeForwardSlash default value changed to false
  • JsonLayout always includes decimal point for floating-point types
  • CallSite-renderer will automatically clean async callstacks
  • The Simplelayout.ToString() has been changed

Many other improvements

For a full list of all the enhancements and performance improvements: NLog 5.0 Pull Requests

Thank you: @snakefoot, @304NotModified, @ThomasArdal, @mickelsonmichael, @TalAloni, @njqdev, @menishmueli, @ErickJeffries, @AlanLiu90, @aled, @tetrodoxin, @noamyogev84, @simoneserra93, @sjafarianm, @Orace, @GitHubPang, @KurnakovMaksim

NLog - NLog 4.7.15

Published by snakefoot over 2 years ago

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)
NLog - NLog 4.7.14

Published by snakefoot over 2 years ago

Improvements

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

Published by snakefoot over 2 years ago

Features

  • #4761 LogFactory fluent Setup with AddCallSiteHiddenAssembly (#4761) (@snakefoot)
  • #4757 Updated JetBrains Annotations with StructuredMessageTemplateAttribute (#4757) (@snakefoot)
  • #4754 JsonArrayLayout - Render LogEvent in Json-Array format (#4754) (@snakefoot)
  • #4711 Added WithProperties-method for Logger-class (#4711) (@simoneserra93)
  • #4613 Added LogFactory.ReconfigureExistingLoggers with purgeObsoleteLoggers option (#4613) (@sjafarianm)

Improvements

  • #4730 MemoryTarget - Updated to implement TargetWithLayoutHeaderAndFooter (#4730) (@snakefoot)
  • #4730 TraceTarget - Updated to implement TargetWithLayoutHeaderAndFooter (#4730) (@snakefoot)
  • #4717 DatabaseTarget - Improved parsing of DbType (#4717) (@Orace)
NLog - NLog 5.0.0-RC1

Published by snakefoot almost 3 years ago

Features

  • #4662 LogFactory Setup fluent with SetupLogFactory for general options (#4662) (@snakefoot)
  • #4648 LogFactory fluent Setup with FilterDynamicIgnore + FilterDynamicLog (#4648) (@snakefoot)
  • #4642 TargetWithContext - Added support for ExcludeProperties (#4642) (@snakefoot)

Improvements

  • #4656 FallbackGroupTarget - Added support for EnableBatchWrite (#4656) (@snakefoot)
  • #4655 JsonLayout - ExcludeProperties should also handle IncludeScopeProperties (#4655) (@snakefoot)
  • #4645 TargetWithContext - IncludeEmptyValue false by default (#4645) (@snakefoot)
  • #4646 PropertiesDictionary - Generate unique message-template-names on duplicate keys (#4646) (@snakefoot)
  • #4661 LoggingRule - Fix XML documentation (#4661) (@GitHubPang)
  • #4671 Fixed RegisterObjectTransformation to handle conversion to simple values (#4671) (@snakefoot)
  • #4669 LogLevel - Replaced IConvertible with IFormattable for better Json output (#4669) (@snakefoot)
  • #4676 NLog.Wcf - Updated nuget dependencies to System.ServiceModel ver. 4.4.4 (#4676) (@snakefoot)
  • #4675 FileTarget - Improve fallback logic when running on Linux without File BirthTIme (#4675) (@snakefoot)
  • #4680 FileTarget - Better handling of relative paths with FileSystemWatcher (#4680) (@snakefoot)
  • #4689 Renamed AppSettingLayoutRenderer2 to AppSettingLayoutRenderer after removing NLog.Extended (#4689) (@snakefoot)
  • #4563 Added alias ToUpper and ToLower as alternative to UpperCase and LowerCase (#4563) (@snakefoot)
  • #4695 Ignore dash (-) when parsing layouts, layoutrenderers and targets (#4695) (@304NotModified)
  • #4713 Logger SetProperty marked as obsolete, instead use WithProperty or the unsafe Properties-property (#4713) (@snakefoot)
  • #4714 Hide obsolete methods from intellisense (#4714) (@snakefoot)

Performance

  • #4672 PaddingLayoutRendererWrapper - Pad operation with reduced string allocation (#4672) (@snakefoot)
  • #4698 FileTarget - Use Environment.TickCount to trigger File.Exists checks (#4698) (@snakefoot)
  • #4699 AsyncTargetWrapper - Fix performance for OverflowAction Block on NetCore (#4699) (@snakefoot)
  • #4705 LogEventInfo - Faster clone of messageTemplateParameters by caching Count (#4705) (@snakefoot)
NLog - NLog 4.7.13

Published by 304NotModified almost 3 years ago

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

NLog - NLog 5.0.0-preview 3

Published by snakefoot almost 3 years ago

See List of major changes in NLog 5.0

Bugfixes

  • #4627 PropertiesDictionary - Fixed threading issue in EventProperties (#4627) (@snakefoot)

Features

  • #4598 LogFactory fluent Setup with WriteToTrace + WriteToDebug (#4598) (@snakefoot)
  • #4628 LogEventInfo constructor with eventProperties as IReadOnlyList (#4628) (@snakefoot)
  • #4633 ${event-properties} now ignore case when doing property lookup (#4633) (@snakefoot)

Improvements

  • #4623 FileTarget - KeepFileOpen = true by default to avoid loosing file handle (#4623) (@snakefoot)
  • #4624 FileTarget - Only enable FileSystemWatcher when ConcurrentWrites = true (#4624) (@snakefoot)
  • #4634 FileTarget - Attempt to write footer, before closing file appender (#4634) (@snakefoot)
  • #4632 JsonSerializeOptions - Marked Format + FormatProvider + QuoteKeys as obsolete (#4632) (@snakefoot)
  • #4622 Handle OutOfMemoryException instead of crashing the application (#4622) (@snakefoot)
  • #4605 Removed DefaultValue-attribute as it is only used for docs-generator (#4605) (@snakefoot)
  • #4606 Removed Advanced-attribute as it has no meaning (#4606) (@snakefoot)
NLog - NLog 4.7.12

Published by snakefoot almost 3 years ago

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)
NLog - NLog 5.0.0-preview 2

Published by snakefoot about 3 years ago

See List of major changes in NLog 5.0

Bugfixes

  • #4533 Fixed validation of nlog-element when using include-files (#4533) (@snakefoot)
  • #4555 Fixed validation of nlog-element when nested within configuration-element (#4555) (@snakefoot)

Features

  • #4542 NetworkTarget - Added OnQueueOverflow with default Discard (#4542) (@snakefoot)

Improvements

  • #4544 ScopeContext - Renamed IncludeScopeNestedStates to IncludeScopeNested for consistency (#4544) (@snakefoot)
  • #4545 ScopeContext - Renamed PushScopeState to PushScopeNested for consistency (#4545) (@snakefoot)
  • #4556 NetworkTarget - Explicit assigning LineEnding activates NewLine automatically (#4556) (@snakefoot)
  • #4549 NetworkTarget - UdpNetworkSender changed to QueuedNetworkSender with correct message split (#4549) (@snakefoot)
  • #4542 NetworkTarget - Changed OnConnectionOverflow to discard by default (#4542) (@snakefoot)
  • #4564 Fixed LayoutParser so Typed Layout works for LayoutRenderer (#4564) (@snakefoot)
  • #4580 LayoutRenderer and Layout are now always threadsafe by default (#4580) (@snakefoot)
  • #4586 ScopeTiming - No Format specified renders TimeSpan.TotalMilliseconds (#4586) (@snakefoot)
  • #4583 ExceptionLayoutRenderer - Separator with basic layout support (#4583) (@snakefoot)
  • #4588 StackTraceLayoutRenderer - Separator with basic layout support (#4588) (@snakefoot)
  • #4589 ScopeNestedLayoutRenderer - Separator with basic layout support (#4589) (@snakefoot)
NLog - NLog 5.0.0-preview 1

Published by 304NotModified about 3 years ago

~100 issues closed, +200 pull requests merged, +400 commit added. NLog 5 preview 1 is live!

Including: Performance improvements, Fluent configuration API, better Dependency Injection support, better defaults and some breaking changes (binary and behavior). See List of major changes in NLog 5.0

Thank you: @snakefoot, @304NotModified, @TalAloni, @njqdev, @menishmueli, @ErickJeffries, @AlanLiu90, @aled, @tetrodoxin, @noamyogev84

NLog - NLog 4.7.11

Published by snakefoot about 3 years ago

Bugfixes

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

Features

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

Published by 304NotModified over 3 years ago

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)
NLog - NLog 4.7.9

Published by snakefoot over 3 years ago

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)
NLog - NLog 4.7.8

Published by snakefoot over 3 years ago

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)
NLog - NLog 4.7.7

Published by snakefoot over 3 years ago

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)
NLog - NLog 4.7.6

Published by 304NotModified almost 4 years ago

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)
NLog - NLog 4.7.5

Published by 304NotModified about 4 years ago

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)
NLog - NLog 4.7.4

Published by 304NotModified about 4 years ago

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)
Package Rankings
Top 8.17% on Proxy.golang.org
Related Projects