Skip to content

Commit 3f459e1

Browse files
committed
Fix tests
1 parent 2ecbe0a commit 3f459e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/Serilog.Settings.Configuration.Tests/ConfigurationSettingsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ public void LoggingLevelSwitchIsConfigured(string switchName)
393393
.WriteTo.Sink(new DelegatingSink(e => evt = e))
394394
.CreateLogger();
395395

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);
398398
log.Write(Some.DebugEvent());
399399
Assert.True(evt is null, "LoggingLevelSwitch initial level was Warning. It should not log Debug messages");
400400
log.Write(Some.InformationEvent());

test/Serilog.Settings.Configuration.Tests/DynamicLevelChangeTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public void ShouldRespectDynamicLevelChanges()
5050
.Configuration(new ConfigurationBuilder().Add(_configSource).Build(), out var loadedConfiguration)
5151
.CreateLogger();
5252

53-
Assert.Equal(LogEventLevel.Information, loadedConfiguration.LogLevelSwitches["mySwitch"].MinimumLevel);
53+
Assert.Equal(LogEventLevel.Information, loadedConfiguration.LogLevelSwitches["$mySwitch"].MinimumLevel);
5454

5555
DummyConsoleSink.Emitted.Clear();
5656
logger.Write(Some.DebugEvent());
@@ -66,7 +66,7 @@ public void ShouldRespectDynamicLevelChanges()
6666
logger.Write(Some.DebugEvent());
6767
logger.ForContext(Constants.SourceContextPropertyName, "Root.Test").Write(Some.DebugEvent());
6868
Assert.Single(DummyConsoleSink.Emitted);
69-
Assert.Equal(LogEventLevel.Debug, loadedConfiguration.LogLevelSwitches["mySwitch"].MinimumLevel);
69+
Assert.Equal(LogEventLevel.Debug, loadedConfiguration.LogLevelSwitches["$mySwitch"].MinimumLevel);
7070

7171
DummyConsoleSink.Emitted.Clear();
7272
UpdateConfig(overrideLevel: LogEventLevel.Debug);

0 commit comments

Comments
 (0)