Features
- Support Windows Phone 8, Xamarin Android and Xamarin iOS (beta)
- Consistent handling of exceptions (BEHAVIOUR CHANGE)
- Control of exception throwing for configuration errors
- API improvements
- Relative paths for fileTarget
- InternalLogger: write to System.Diagnostics.Trace
- Mail Target: Allow virtual paths for SMTP pickup
- EventTarget: option to set the max length of the message and action (discard, split, truncate)
- MethodCallTarget: allow optional parameters in called methods.
- ConsoleTarget: Regex cache is instead of compiled regex, for better memory usage. This is configurable.
- Database target: don't require "ProviderName" attribute when using
<connectionStrings>
- RegistryLayout: Support for layouts, RegistryView (32, 64 bit) and all root key names (HKCU/HKLM etc)
- Allow to free CallContext in
MappedDiagnosticsLogicalContext
- LogFactory: Add generic-type versions of
GetLogger()
andGetCurrentClassLogger()
- Added
Logger.Swallow(Task task)
- Unused targets will be logged to the internal logger
- Config classes are now thread-safe.
- InternalLogger: improved logging of exceptions (analogous to normal Logger)
- More logging to the internal logger (e.g. Async wrapper and buffer wrapper)
- Added timestamp options for the internal logger.
- Autoload NLog.config in assets folder on Android
Bug fixes
Among others:
${callsite}
works now for async methods!- A lot of Filetarget bug fixes regarding with archiving, locking and concurrent writing.
Most noticeable:- Use last-write-time for archive file name. This is far more stable.
In the past there were some issues with unexpected archive filenames. - Fix: archiving won't work when a there is a date in the filename
- Fix: archiving not working properly with AsyncWrapper
- Fix: Footer for archiving
- Fix: Crashes with relative path without
${basedir}
- Fix: Archive files are never created when there are lot of write in log file
- Use last-write-time for archive file name. This is far more stable.
- NetworkTarget: fix possible deadlock
- Fix autoreload nlog.config with parent configs.
- WebServiceTarget: Fix HTTP GET protocol
- Bugfix: Internallogger creates folder, even when turned off
- Fix possible Nullref in
${variable}
${processtime}
: incorrect milliseconds formatting${processtime}
: fix incorrect negative time (rounding issue)- FileTarget: Fix writing log files to root dir
- Check for TimeToSleepBetweenBatches in AsyncWrapper
See milestone