NLog - Custom Target
Nlog similar to log4net is quite a powerful logging library. Though out of the box it provides logging to text files, windows event log, database, Sentinal etc but how about about custom logging? Extending NLog to write to your own custom target is as quite simple as follows:
Create the target class:
Register the target class:
Add to nlog configuration to assign log level:
Example: Note that the example above is specific to my custom logger.
<< Home