Skip to content

Commit

Permalink
[dotnet] Checking if log level is enabled before logging in SM.
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Apr 23, 2024
1 parent 5c5c68e commit 4a07526
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dotnet/src/webdriver/SeleniumManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ private static Dictionary<string, object> RunCommand(string fileName, string arg
switch (entry.Key)
{
case "WARN":
_logger.Warn(entry.Value);
if (_logger.IsEnabled(LogEventLevel.Warn))
{
_logger.Warn(entry.Value);
}
break;
case "DEBUG":
case "INFO":
Expand Down

0 comments on commit 4a07526

Please sign in to comment.