Skip to content

Commit 4a07526

Browse files
committed
[dotnet] Checking if log level is enabled before logging in SM.
1 parent 5c5c68e commit 4a07526

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

dotnet/src/webdriver/SeleniumManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ private static Dictionary<string, object> RunCommand(string fileName, string arg
194194
switch (entry.Key)
195195
{
196196
case "WARN":
197-
_logger.Warn(entry.Value);
197+
if (_logger.IsEnabled(LogEventLevel.Warn))
198+
{
199+
_logger.Warn(entry.Value);
200+
}
198201
break;
199202
case "DEBUG":
200203
case "INFO":

0 commit comments

Comments
 (0)