File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
test/Serilog.Settings.Configuration.Tests Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -393,8 +393,8 @@ public void LoggingLevelSwitchIsConfigured(string switchName)
393
393
. WriteTo . Sink ( new DelegatingSink ( e => evt = e ) )
394
394
. CreateLogger ( ) ;
395
395
396
- Assert . Contains ( "switch1" , loadedConfiguration . LogLevelSwitches ) ;
397
- Assert . Equal ( LogEventLevel . Warning , loadedConfiguration . LogLevelSwitches [ "switch1" ] . MinimumLevel ) ;
396
+ Assert . Contains ( "$ switch1" , loadedConfiguration . LogLevelSwitches ) ;
397
+ Assert . Equal ( LogEventLevel . Warning , loadedConfiguration . LogLevelSwitches [ "$ switch1" ] . MinimumLevel ) ;
398
398
log . Write ( Some . DebugEvent ( ) ) ;
399
399
Assert . True ( evt is null , "LoggingLevelSwitch initial level was Warning. It should not log Debug messages" ) ;
400
400
log . Write ( Some . InformationEvent ( ) ) ;
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public void ShouldRespectDynamicLevelChanges()
50
50
. Configuration ( new ConfigurationBuilder ( ) . Add ( _configSource ) . Build ( ) , out var loadedConfiguration )
51
51
. CreateLogger ( ) ;
52
52
53
- Assert . Equal ( LogEventLevel . Information , loadedConfiguration . LogLevelSwitches [ "mySwitch" ] . MinimumLevel ) ;
53
+ Assert . Equal ( LogEventLevel . Information , loadedConfiguration . LogLevelSwitches [ "$ mySwitch" ] . MinimumLevel ) ;
54
54
55
55
DummyConsoleSink . Emitted . Clear ( ) ;
56
56
logger . Write ( Some . DebugEvent ( ) ) ;
@@ -66,7 +66,7 @@ public void ShouldRespectDynamicLevelChanges()
66
66
logger . Write ( Some . DebugEvent ( ) ) ;
67
67
logger . ForContext ( Constants . SourceContextPropertyName , "Root.Test" ) . Write ( Some . DebugEvent ( ) ) ;
68
68
Assert . Single ( DummyConsoleSink . Emitted ) ;
69
- Assert . Equal ( LogEventLevel . Debug , loadedConfiguration . LogLevelSwitches [ "mySwitch" ] . MinimumLevel ) ;
69
+ Assert . Equal ( LogEventLevel . Debug , loadedConfiguration . LogLevelSwitches [ "$ mySwitch" ] . MinimumLevel ) ;
70
70
71
71
DummyConsoleSink . Emitted . Clear ( ) ;
72
72
UpdateConfig ( overrideLevel : LogEventLevel . Debug ) ;
You can’t perform that action at this time.
0 commit comments