Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contribute fluent log builder #382

Merged
2 commits merged into from
Jul 11, 2014
Merged

contribute fluent log builder #382

2 commits merged into from
Jul 11, 2014

Conversation

pwelter34
Copy link

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

ghost pushed a commit that referenced this pull request Jul 11, 2014
contribute fluent log builder
@ghost ghost merged commit 6a975be into NLog:master Jul 11, 2014
@ghost ghost added feature and removed feature labels Jul 11, 2014
@ghost ghost added this to the 3.1.1 milestone Jul 11, 2014
@ghost ghost added feature and removed enhancement Improvement on existing feature labels Jan 13, 2015
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant