-
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 #557 from ckadluba/serilog4-update
Update serilog to 4 and move batching to Serilog core (fixed tests)
- Loading branch information
Showing
11 changed files
with
93 additions
and
136 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
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.