Release v8.0.0-beta.10
Pre-release💫 Changed
- #171 [BREAKING CHANGE] Move maximum log event size configuration from batch formatter to sink configuration, and change it's default value from 256 kB to
null
Migration guide
Given that you're depending on the default maximum log event size configuration in DefaultBatchFormatter
or ArrayBatchFormatter
, or have defined your own limit when instantiating these classes, you should apply the following changes.
// Before migration
log = new LoggerConfiguration()
// Changes are also applicable to DurableHttpUsingFileSizeRolledBuffers
// and DurableHttpUsingTimeRolledBuffers
.WriteTo.Http(
requestUri: "https://www.mylogs.com",
batchFormatter: new ArrayBatchFormatter(ByteSize.MB))
.CreateLogger();
// After migration
log = new LoggerConfiguration()
.WriteTo.Http(
requestUri: "https://www.mylogs.com",
logEventLimitBytes: ByteSize.MB,
batchFormatter: new ArrayBatchFormatter())
.CreateLogger();
- #171 [BREAKING CHANGE] Rename sink configuration argument
batchPostingLimit
tologEventsInBatchLimit
Migration guide
Given tha you're defining the maximum number of log events in a single batch, you should apply the following changes.
// Before migration
log = new LoggerConfiguration()
// Changes are also applicable to DurableHttpUsingFileSizeRolledBuffers
// and DurableHttpUsingTimeRolledBuffers
.WriteTo.Http(
requestUri: "https://www.mylogs.com",
batchPostingLimit: 100,
.CreateLogger();
// After migration
log = new LoggerConfiguration()
.WriteTo.Http(
requestUri: "https://www.mylogs.com",
logEventsInBatchLimit: 100,
.CreateLogger();
Given you are configuring the sink in application configuration you should apply the following changes.
// Before migration
// Changes are also applicable to DurableHttpUsingFileSizeRolledBuffers
// and DurableHttpUsingTimeRolledBuffers
{
"Serilog": {
"WriteTo": [
{
"Name": "Http",
"Args": {
"requestUri": "https://www.mylogs.com",
"batchPostingLimit": 100
}
}
]
}
}
// After migration
{
"Serilog": {
"WriteTo": [
{
"Name": "Http",
"Args": {
"requestUri": "https://www.mylogs.com",
"logEventsInBatchLimit": 100
}
}
]
}
}
- #203 [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.
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
}
}
]
}
}
- #178 [BREAKING CHANGE] Batch formatter
DefaultBatchFormatter
was removed whenArrayBatchFormatter
was promoted to default batch formatter.
Migration guide
You'll have to migrate your code if you used DefaultBatchFormatter
, either implicitly by not specifying a batch formatter, or explicitly by specifying DefaultBatchFormatter
when configuring the sink.
Given that you wish to continue using DefaultBatchFormatter
as your batch formatter you should copy its implementation from the wiki into your own codebase.
Given that you decide to migrate into using ArrayBatchFormatter
instead of DefaultBatchFormatter
, you should verify that your log server is capable of receiving the new JSON payload format.
💀 Removed
- #215 [BREAKING CHANGE] Remove support for .NET Standard 1.3, aligning with the cross-platform targeting library guidance
💉 Fixed
- #220 - Text formatters
NamespacedTextFormatter
,NormalRenderedTextFormatter
andNormalTextFormatter
should write the timestamp in UTC