Skip to content

Added an overload of File() that accepts an ITextFormatter #5

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

Merged
merged 1 commit into from
Jul 4, 2016

Conversation

nblumhardt
Copy link
Member

Fixes #4. Usage is:

.WriteTo.File(new JsonFormatter(), "C:\\path", ...<as before>)

The existing signature accepts both an output template and format provider, to create MessageTemplateTextFormatter under the hood. This one omits both of those parameters and accepts the formatter directly as the first arg.

There are two options for positioning: first, before the path, or second, after it. Not sure if I have a strong preference either way - adding it first gets rid of the intellisense ambiguity as soon as the user has specified a path, so might be the cleaner option in usage.

Once merged this should publish a 2.1.0-dev-nnn package version.

@nblumhardt
Copy link
Member Author

Ready to merge, just in case the last sentence of the PR description created any doubt :-)

@adamchester adamchester merged commit f0cfa5b into serilog:dev Jul 4, 2016
@adamchester
Copy link
Member

💥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants