Skip to content

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

Closed
@KorneiDontsov

Description

@KorneiDontsov
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions