From cbfadba55e6dc621ae1f194772a6e2095fffb1b1 Mon Sep 17 00:00:00 2001 From: Nicholas Blumhardt Date: Wed, 1 Jun 2016 08:48:54 +1000 Subject: [PATCH] Nitpick, get rid of the empty string literal :-) --- src/Serilog/Configuration/LoggerMinimumLevelConfiguration.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Serilog/Configuration/LoggerMinimumLevelConfiguration.cs b/src/Serilog/Configuration/LoggerMinimumLevelConfiguration.cs index fe02a8158..8b1089cf8 100644 --- a/src/Serilog/Configuration/LoggerMinimumLevelConfiguration.cs +++ b/src/Serilog/Configuration/LoggerMinimumLevelConfiguration.cs @@ -135,7 +135,7 @@ public LoggerConfiguration Override(string source, LoggingLevelSwitch levelSwitc if (levelSwitch == null) throw new ArgumentNullException(nameof(levelSwitch)); var trimmed = source.Trim(); - if (trimmed == "") + if (trimmed.Length == 0) throw new ArgumentException("A source name must be provided.", nameof(source)); _addOverride(trimmed, levelSwitch);