OnLog event for NLog


Keywords
NLog, dotnet
License
BSD-3-Clause
Install
Install-Package NLog.Events -Version 0.2.1-rc1

Documentation

NLogEvents

This .NET library defines an event that triggers whenever a log record is sent to NLog. It provides an easy to use API for intercepting logs.

Usage

  1. Add a nuget dependency on NLog.Events.
  2. Define a target with type OnLogEvent in your NLog.config, and a rule that sends some logs to it.
  3. Subscribe to NLogEvents.Events.OnLog event. It'll fire whenever a log record is sent to the OnLogEvent you've defined.

See Example.