Skip to content

Commit

Permalink
[dotnet] Treat SM's logs always as Trace to avoid SM writing at Info …
Browse files Browse the repository at this point in the history
…level (#14667)
  • Loading branch information
nvborisenko authored Oct 28, 2024
1 parent 6b40d9e commit b2702ca
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions dotnet/src/webdriver/SeleniumManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,28 +195,12 @@ private static ResultResponse RunCommand(string fileName, string arguments)

if (jsonResponse.Logs is not null)
{
foreach (var entry in jsonResponse.Logs)
// Treat SM's logs always as Trace to avoid SM writing at Info level
if (_logger.IsEnabled(LogEventLevel.Trace))
{
switch (entry.Level)
foreach (var entry in jsonResponse.Logs)
{
case "WARN":
if (_logger.IsEnabled(LogEventLevel.Warn))
{
_logger.Warn(entry.Message);
}
break;
case "DEBUG":
if (_logger.IsEnabled(LogEventLevel.Debug))
{
_logger.Debug(entry.Message);
}
break;
case "INFO":
if (_logger.IsEnabled(LogEventLevel.Info))
{
_logger.Info(entry.Message);
}
break;
_logger.Trace($"{entry.Level} {entry.Message}");
}
}
}
Expand Down

0 comments on commit b2702ca

Please sign in to comment.