An open API service indexing awesome lists of open source software.

https://github.com/loresoft/nlog.fluent

Fluent API for NLog
https://github.com/loresoft/nlog.fluent

Last synced: 4 months ago
JSON representation

Fluent API for NLog

Awesome Lists containing this project

README

          

NLog.Fluent
===========

Fluent API for NLog

Examples
===========

Writing info message via fluent API.

_logger.Info()
.Message("This is a test fluent message '{0}'.", DateTime.Now.Ticks)
.Property("Test", "InfoWrite")
.Write();

Writing error message.

try
{
string text = File.ReadAllText(path);
}
catch (Exception ex)
{
_logger.Error()
.Message("Error reading file '{0}'.", path)
.Exception(ex)
.Property("Test", "ErrorWrite")
.Write();
}