-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #562 from serilog-mssql/dev
* Fixed issue #543: Update to Serilog v4, remove reference to Serilog.Sinks.PeriodicBatching (thanks to @cancakar35) * Full automatic release and run on ubuntu-latest agent * Added developer documentation * Enabled .NET package validation
- Loading branch information
Showing
15 changed files
with
177 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Creating Releases | ||
|
||
## Creating a Pre-release (-dev suffix) | ||
|
||
Whenever the `dev` branch is updated (after merging a pull request), the `Release` action is triggered. This action builds a nuget package with a prerelease identifier of the format `-dev-nnnnn` appended to the version number. This package is automatically published on nuget.org. | ||
|
||
## Creating a latest Release | ||
|
||
### Normal Update (no major version change) {#normal-update} | ||
|
||
1. On the `dev` branch, update CHANGES.md and `VersionPrefix` in Serilog.Sinks.MSSqlServer.csproj. | ||
|
||
1. Create a PR to merge the `dev` branch into `main`. The `Release` action will be triggered. This action builds a nuget package and publishes it on nuget.org. Additionally a release is created in the GitHub repo. The release summary will be taken from the description of the PR, so best thing is to put something similar to the version summary in CHANGES.md in there. | ||
|
||
1. After the release is done, increase the patch version number in `VersionPrefix` in Serilog.Sinks.MSSqlServer.csproj on the `dev` branch. This ensures that the next dev release will have a higher version number than the latest release. | ||
|
||
### Major Release (major version change) | ||
|
||
1. On the `dev` branch, update CHANGES.md and increase the major version in `VersionPrefix` in Serilog.Sinks.MSSqlServer.csproj. Also set `EnablePackageValidation` to false because on an intial release of a new major version you don't have a baseline version yet on nuget.org to compare with. | ||
|
||
1. Create a PR to merge the `dev` branch into `main`. The `Release` action will be triggered. This works the same as described above under [Normal Update]({#normal-update). | ||
|
||
1. After the release is done make some changes in Serilog.Sinks.MSSqlServer.csproj on the `dev` branch. Set `EnablePackageValidation` back to true and `PackageValidationBaselineVersion` to the version of the new major release you just created (e.g. 7.0.0). Then also increase the patch version number in `VersionPrefix` (e.g. 7.0.1). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Serilog.Sinks.MSSqlServer/Configuration/Factories/IMSSqlServerSinkFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/Serilog.Sinks.MSSqlServer/Configuration/Factories/IPeriodicBatchingSinkFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Serilog.Sinks.MSSqlServer/Configuration/Factories/MSSqlServerSinkFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 5 additions & 6 deletions
11
src/Serilog.Sinks.MSSqlServer/Configuration/Factories/PeriodicBatchingSinkFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
using Serilog.Core; | ||
using Serilog.Sinks.PeriodicBatching; | ||
using Serilog.Configuration; | ||
using Serilog.Core; | ||
|
||
namespace Serilog.Sinks.MSSqlServer.Configuration.Factories | ||
{ | ||
internal class PeriodicBatchingSinkFactory : IPeriodicBatchingSinkFactory | ||
{ | ||
public ILogEventSink Create(IBatchedLogEventSink sink, MSSqlServerSinkOptions sinkOptions) | ||
{ | ||
var periodicBatchingSinkOptions = new PeriodicBatchingSinkOptions | ||
var periodicBatchingSinkOptions = new BatchingOptions | ||
{ | ||
BatchSizeLimit = sinkOptions.BatchPostingLimit, | ||
Period = sinkOptions.BatchPeriod, | ||
BufferingTimeLimit = sinkOptions.BatchPeriod, | ||
EagerlyEmitFirstEvent = sinkOptions.EagerlyEmitFirstEvent | ||
}; | ||
|
||
return new PeriodicBatchingSink(sink, periodicBatchingSinkOptions); | ||
return LoggerSinkConfiguration.CreateSink(lc => lc.Sink(sink, periodicBatchingSinkOptions)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.