Skip to content

Commit

Permalink
chore: change culture for string comparison
Browse files Browse the repository at this point in the history
change string comparison culture from currentCulture to Ordinal

Refs: serilog#1944
  • Loading branch information
Phil91 committed Aug 8, 2023
1 parent eeab9b8 commit 27cf205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Serilog/Core/LevelOverrideMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public LevelOverride(string context, LoggingLevelSwitch levelSwitch)
{
foreach (var levelOverride in _overrides)
{
if (context.StartsWith(levelOverride.Context, StringComparison.CurrentCultureIgnoreCase) &&
if (context.StartsWith(levelOverride.Context, StringComparison.OrdinalIgnoreCase) &&
(context.Length == levelOverride.Context.Length || context[levelOverride.Context.Length] == '.'))
{
minimumLevel = LevelAlias.Minimum;
Expand Down

0 comments on commit 27cf205

Please sign in to comment.