https://github.com/romkatv/nlogevents
OnLog event for NLog
https://github.com/romkatv/nlogevents
dotnet nlog
Last synced: 7 months ago
JSON representation
OnLog event for NLog
- Host: GitHub
- URL: https://github.com/romkatv/nlogevents
- Owner: romkatv
- License: bsd-3-clause
- Created: 2018-04-30T12:37:08.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-09T16:49:22.000Z (almost 3 years ago)
- Last Synced: 2025-04-21T19:46:42.276Z (7 months ago)
- Topics: dotnet, nlog
- Language: C#
- Size: 32.2 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NLogEvents
This .NET library defines an event that triggers whenever a log record is sent
to [NLog](https://github.com/NLog/NLog). It provides an easy to use API for
intercepting logs.
## Usage
1. Add a nuget dependency on
[NLog.Events](https://www.nuget.org/packages/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](https://github.com/romkatv/NLogEvents/blob/master/Example).