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.
It can process diagnostic messages emitted from any .NET language, augment them with contextual information, format them according to your preference and send them to one or more targets such as file or database.
Major and minor releases will be posted on project news.
For the possible options in the config, check the Options list and API Reference
Having troubles? Check the troubleshooting guide
ℹ️ NLog 6.0 will support AOT
NLog 6.0 RC3 now available. See also List of major changes in NLog 6.0
The NLog-nuget-package provides everything needed for doing file- and console-logging. If you need other output options, then there are many NLog extension packages available (such as databases, email, cloud services, etc.). See targets and layout renderers overview!
The NLog extension packages maintained by the NLog-project are listed here with Nuget/build status.
It is also possible to Create your own custom NLog extensions.
If having issues with getting NLog working? Then please check the troubleshooting guide before asking! This will often provide you with clear error message when asking, so it is easier to solve the issue!
If having questions about how to configure NLog correctly? Then please post questions on StackOverflow (using the nlog
tag)
Have you found a bug or issue with NLog functionality? Please post them on the issue list and follow these guidelines.
See FAQ on the Wiki
NLog is open source software, licensed under the terms of BSD license. See LICENSE.txt for details.