Skip to content

Commit a21bedc

Browse files
committed
[dotnet] Don't write trace log message when waiting until driver service is initialized
On CI execution we see a lot of exceptions logged to output. Given that timeout is 5 seconds only, it is good just to suppress these exceptions even in internal logs.
1 parent 61d5f45 commit a21bedc

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

dotnet/src/webdriver/DriverService.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// limitations under the License.
1717
// </copyright>
1818

19-
using OpenQA.Selenium.Internal.Logging;
2019
using OpenQA.Selenium.Remote;
2120
using System;
2221
using System.Diagnostics;
@@ -42,7 +41,6 @@ public abstract class DriverService : ICommandServer
4241
private bool isDisposed;
4342
private Process driverServiceProcess;
4443
private TimeSpan initializationTimeout = TimeSpan.FromSeconds(20);
45-
private readonly static ILogger logger = Log.GetLogger<DriverService>();
4644

4745
/// <summary>
4846
/// Initializes a new instance of the <see cref="DriverService"/> class.
@@ -238,10 +236,7 @@ protected virtual bool IsInitialized
238236
}
239237
catch (Exception ex) when (ex is HttpRequestException || ex is TaskCanceledException)
240238
{
241-
if (logger.IsEnabled(LogEventLevel.Trace))
242-
{
243-
logger.Trace(ex.ToString());
244-
}
239+
// do noothing: the exception is expected, meaning driver service is not initialized
245240
}
246241

247242
return isInitialized;

0 commit comments

Comments
 (0)