Skip to content

Can not override formatter #6

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

Closed
antonydenyer opened this issue Jul 4, 2016 · 3 comments
Closed

Can not override formatter #6

antonydenyer opened this issue Jul 4, 2016 · 3 comments

Comments

@antonydenyer
Copy link

When creating a RollingFile Configuration, is their a good reason why you can not specify ITextFormatter like you use be able to?

If not I'll create a pull request.

@nblumhardt
Copy link
Member

Howdy! Nothing's been removed here; I think you're thinking of:

.WriteTo.Sink(new RollingFileSink(..., new JsonFormatter(), ...))

However, as luck would have it, I just made exactly the PR you describe over on the File sink and have RollingFile lined up for the same treatment today! :-) serilog/serilog-sinks-file#5

Cheers,
Nick

nblumhardt added a commit that referenced this issue Jul 5, 2016
Fixes #6 - add configuration overload accepting text formatter
@nblumhardt nblumhardt mentioned this issue Jul 5, 2016
@nblumhardt
Copy link
Member

2.1.0 should be up on NuGet in a few short moments: https://ci.appveyor.com/project/serilog/serilog-sinks-rollingfile/build/715

Cheers!

@antonydenyer
Copy link
Author

You're right I was thinking of that, couldn't do it the RollingFileSink so assumed the new way was to use the extension methods. Got everything working as expected now.

Thanks!

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

No branches or pull requests

2 participants