Skip to content

Release v8.0.0-beta.11

Pre-release
Pre-release
Compare
Choose a tag to compare
@FantasticFiasco FantasticFiasco released this 20 Feb 23:31
451daaa
  • #203, #245 [BREAKING CHANGE] Non-durable sink has changed from having its maximum queue size defined as number of events into number of bytes, making it far easier to reason about memory consumption. It's importance to the behavior of the sink was also the reasoning for promoting it from being optional to being mandatory. (proposed by @seruminar)

Given you are configuring the sink in code you should do the following changes.

// Before migration
log = new LoggerConfiguration()
  .WriteTo.Http(
    requestUri: "https://www.mylogs.com",
    queueLimit: 1000)
  .CreateLogger();

// After migration
log = new LoggerConfiguration()
  .WriteTo.Http(
    requestUri: "https://www.mylogs.com",
    queueLimitBytes: 50 * ByteSize.MB)
  .CreateLogger();

Given you are configuring the sink in application configuration you should do the following changes.

// Before migration
{
  "Serilog": {
    "WriteTo": [
      {
        "Name": "Http",
        "Args": {
          "requestUri": "https://www.mylogs.com",
          "queueLimit": 1000
        }
      }
    ]
  }
}

// After migration
{
  "Serilog": {
    "WriteTo": [
      {
        "Name": "Http",
        "Args": {
          "requestUri": "https://www.mylogs.com",
          "queueLimitBytes": 52428800
        }
      }
    ]
  }
}