Skip to content

Conversation

@nblumhardt
Copy link
Member

serilog/serilog#828

This makes AuditTo.File() work with Serilog 2.2-*.

try
{
sink = new FileSink(path, formatter, fileSizeLimitBytes, buffered: buffered);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The precondition checks have always thrown in File(); this PR changes what throws/what doesn't very slightly, in that invalid path errors are now always suppressed in WriteTo scenarios and always propagate with AuditTo.

In general it's really hard to pin down which argument errors should be throwing ones. Serilog aims to always propagate API usage errors, and always (by default) suppress environmental/transient/runtime errors. In the case of the System.IO APIs and various configuration providers the line is fuzzy at times.

@nblumhardt
Copy link
Member Author

Merging so that the downstream items (XML and JSON support) can be kicked off :-)

@nblumhardt nblumhardt merged commit e590280 into serilog:dev Aug 17, 2016
@nblumhardt nblumhardt mentioned this pull request Aug 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant