-
Notifications
You must be signed in to change notification settings - Fork 131
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 #146 from serilog/dev
3.0.1 Release
- Loading branch information
Showing
6 changed files
with
220 additions
and
17 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/Serilog.Settings.Configuration/Serilog.Settings.Configuration.csproj
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
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,46 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.Extensions.Configuration; | ||
using Serilog.Core; | ||
using Serilog.Events; | ||
|
||
namespace TestDummies | ||
{ | ||
public class DummyConfigurationSink : ILogEventSink | ||
{ | ||
[ThreadStatic] | ||
static List<LogEvent> _emitted; | ||
|
||
[ThreadStatic] | ||
static IConfiguration _configuration; | ||
|
||
[ThreadStatic] | ||
static IConfigurationSection _configSection; | ||
|
||
public static List<LogEvent> Emitted => _emitted ?? (_emitted = new List<LogEvent>()); | ||
|
||
public static IConfiguration Configuration => _configuration; | ||
|
||
public static IConfigurationSection ConfigSection => _configSection; | ||
|
||
|
||
public DummyConfigurationSink(IConfiguration configuration, IConfigurationSection configSection) | ||
{ | ||
_configuration = configuration; | ||
_configSection = configSection; | ||
} | ||
|
||
public void Emit(LogEvent logEvent) | ||
{ | ||
Emitted.Add(logEvent); | ||
} | ||
|
||
public static void Reset() | ||
{ | ||
_emitted = null; | ||
_configuration = null; | ||
_configSection = null; | ||
} | ||
|
||
} | ||
} |
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