NLog/NLog — pull request #382 by pwelter34 (2014-06-28 04:13:24+00:00)
Title: contribute fluent log builder

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();
}