
Description
NLog is a free, open-source logging library for .NET. It writes log messages to many targets, such as the console, files and databases, and it routes them with flexible rules. You can change the logging configuration while the application runs, without restarting it. Output can be written as simple text, JSON, XML or CSV, and extra context can be added through layout renderers. NLog supports structured logging with message templates and custom log event properties. It integrates with Microsoft Extensions Logging and ASP.NET Core without replacing the standard LoggerFactory. Configuration can be kept in an NLog.config XML file, in appsettings.json or set up in code. Developers can extend NLog with their own targets and layouts or add custom context values. The project focuses on high performance, ease of use and flexible configuration, and its documentation, changelog and issue tracker are published on GitHub.…
Highlights
- Route logs to console, file, database and more
- Change logging configuration without restarting
- Text, JSON, XML and CSV output
- Structured logging with message templates
- Works with ASP.NET Core and Microsoft logging
Ratings & Reviews
No ratings yet
Be the first to rate NLog.
People also visit
NLog FAQ
What is NLog?
NLog is a free, open-source logging library for .NET that writes log messages to targets such as the console, files and databases.
Is NLog free?
Yes. The project describes NLog as free open-source logging for .NET, and its source code and issue tracker are on GitHub.
Can NLog be configured without code?
Yes. The configuration can be loaded from an NLog.config XML file or from appsettings.json, and it can be changed while the application runs.
Does NLog work with ASP.NET Core?
Yes. NLog can be fully integrated with Microsoft Extensions Logging and ASP.NET Core without replacing the standard LoggerFactory.
Can I write my own targets?
Yes. You can extend NLog with custom targets and layouts, or include your own custom context values.
What are the best NLog alternatives?
Popular alternatives to NLog include Nerdlog, Graylog and logit.io. See all NLog alternatives





