Welcome to NLog
NLog is a free logging platform for .NET, NETSTANDARD, Xamarin, Silverlight and Windows Phone with rich log routing and management capabilities. NLog 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 (C#, VB.NET etc.), augment them with contextual information (date and time, severity, thread, process, environment), format according to your preferences and send to one or more targets.
Easy to configure
Every log message can be templated with various layout renders
Targets are used to display, store or pass log messages to another destination. NLog can dynamically write to one of multiple targets for each log message.
There are more than 30 targets provided out-of the box, including:
FilesWrite logs to any number of files, with automatic file naming and archival. NLog won't lock your files by default.
Event LogWrite to event log local or remote
DatabaseStore your logs in databases supported by .NET
There are also wrapper targets which provide buffering, load balacing, failover situations, asynchronous writing and many more scenarios. The full list of targets is available on the wiki. If you didn't find the target to fit your needs, you can easily write a custom one.
- .NET Framework 3.5, 4, 4.5, 4.6 & 4.7
- .NET Framework 4 client profile
- Xamarin Android
- Xamarin iOs
- Windows Phone 8
- Silverlight 4 and 5
- Mono 4
- ASP.NET 4 (NLog.Web package)
- ASP.NET Core (NLog.Web.AspNetCore package)
- .NET Core (NLog.Extensions.Logging package)
- .NET Standard 1.x - NLog 5 beta
- .NET Standard 2.x - NLog 4.5 beta
- UWP - NLog 5 beta
The source code is available under the terms of BSD license.