Skip to content

rollOnFileSizeLimit value is not being used #184

@PedroS11

Description

@PedroS11

In my appsettings.json I have this

{
 "Serilog": {
    "MinimumLevel": "Fatal",
    "WriteTo": [
      {
        "Name": "RollingFile",
        "Args": {
          "pathFormat": "..\\Logs\\log-{Date}.txt",
          "rollingInterval": "Day",
          "retainedFileCountLimit": 31,
          "fileSizeLimitBytes": 1024,
          "rollOnFileSizeLimit": true,
          "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] {Message}{NewLine}{Exception}{NewLine}"
        }
      }
    ],
    "Properties": {
      "Application": "Common feature in WebApi demo"
    }
  }
}

And only one file per day is created when I do multiple requests and exceed the 1Kb limit. What am I doing wrong? I wanted the files *_001.txt being created

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