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
- Host: GitHub
- URL: https://github.com/loresoft/nlog.fluent
- Owner: loresoft
- Created: 2012-06-06T13:54:47.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2012-09-28T17:36:19.000Z (over 13 years ago)
- Last Synced: 2025-10-25T13:34:26.921Z (4 months ago)
- Language: C#
- Size: 609 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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();
}