-
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.
Add a callback on the reader options to expose the log filter switches
Just like it was done for log level switches in #352.
- Loading branch information
Showing
7 changed files
with
77 additions
and
2 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
16 changes: 16 additions & 0 deletions
16
src/Serilog.Settings.Configuration/Settings/Configuration/ILoggingFilterSwitch.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace Serilog.Settings.Configuration; | ||
|
||
/// <summary> | ||
/// A log event filter that can be modified at runtime. | ||
/// </summary> | ||
/// <remarks> | ||
/// Under the hood, the logging filter switch is either a <c>Serilog.Expressions.LoggingFilterSwitch</c> or a <c>Serilog.Filters.Expressions.LoggingFilterSwitch</c> instance. | ||
/// </remarks> | ||
public interface ILoggingFilterSwitch | ||
{ | ||
/// <summary> | ||
/// A filter expression against which log events will be tested. | ||
/// Only expressions that evaluate to <c>true</c> are included by the filter. A <c>null</c> expression will accept all events. | ||
/// </summary> | ||
public string? Expression { get; set; } | ||
} |
2 changes: 1 addition & 1 deletion
2
src/Serilog.Settings.Configuration/Settings/Configuration/LoggingFilterSwitchProxy.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
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