Skip to content

Infinite loop where fileSizeLimitBytes = 0 and rollOnFileSizeLimit = true #146

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
KorneiDontsov opened this issue May 15, 2020 · 2 comments

Comments

@KorneiDontsov
Copy link

loggerConfiguration.WriteTo.File(
    filePath,
    minLevel,
    outputTemplate,
    fileSizeLimitBytes: 0,
    rollOnFileSizeLimit: true)

This code brings an infinite loop at RollingFileSink.cs:85.
fileSizeLimitBytes is validated to be non-negative. I believe it should be validated to be positive.

@cocowalla
Copy link
Contributor

Hi, thanks for the report! I'll take a look and push a fix shortly!

cocowalla added a commit that referenced this issue May 15, 2020
@cocowalla
Copy link
Contributor

Fixed, thanks again for the report!

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