NLog is a free logging platform for .NET with rich log routing and management capabilities. It makes it easy to produce and manage high-quality logs for your application regardless of its size or complexity.
NLog can process diagnostic messages emitted from any .NET language (such as C# or Visual Basic), augment them with contextual information (such as date/time, severity, thread, process, environment enviroment), format them according to your preference and send them to one or more targets such as file or database.
Supported targets include:
- Files – single file or multiple, with automatic file naming and archival
- Event Log – local or remote
- Database – store your logs in databases supported by .NET
- Network – using TCP, UDP, SOAP, MSMQ protocols
- Command-line console – including color coding of messages
- E-mail – you can receive emails whenever application errors occur
- ASP.NET trace
- … and many more
Other key features:
- very easy to configure, both through configuration file and programmatically
- easy-to-use logger pattern known from log4xxx
- advanced routing using buffering, asynchronous logging, load balancing, failover, and more
- cross-platform support: .NET Framework, .NET Compact Framework and Mono (on Windows and Unix)