NLog 3.2.0 has been released

12 Jan 2015

NLog 3.2.0 has been released, and is available at NuGet, the binaries are available at GitHub release page.

This release contains mostly bug fixes, but also a couple of enhancements and new features.


Support for blacklisted assemblies

NLog assemblies are skipped by default, when the calling method is determined, using the callsite renderer. This release adds support for manually specifing assemblies which should be skipped. This is done by set the assemblies to be skipped like this:

LogManager.HiddenAssemblies = new Assembly[] { Assembly.GetExecutingAssembly(), Assembly.GetEntryAssembly() };

Archive files by date and sequence

A new ArchiveNumberMode have been introduced for the File target. It is called DateAndSequence and can be set like this:

<target type='File' archiveNumberMode='DateAndSequence' ...>

As the name says, it “numbers” the archive using both date and sequence number.

Archive old file on startup

A new attribute called archiveOldFileOnStartup has been added to the File target. It allows users to define if an existing file should be archived every time the application starts. It can be set like this:

<target type='File' archiveOldFileOnStartup='true' ...>

Programmatic access to variables defined in configuration file

It is now possible to access variables defined in configuration files like this:


This allows users to add and remove as needed programatically, but please remember that layouts may be cached, meaning that changes to variables may not be shown.