Skip to content

Commit 798cf1c

Browse files
committed
[dotnet] Suppressed not yet initialized safari driver service in internal logs
1 parent 10d5f8c commit 798cf1c

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

dotnet/src/webdriver/DriverService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ protected virtual bool IsInitialized
236236
}
237237
catch (Exception ex) when (ex is HttpRequestException || ex is TaskCanceledException)
238238
{
239-
// do nothing: the exception is expected, meaning driver service is not initialized
239+
// Do nothing. The exception is expected, meaning driver service is not initialized.
240240
}
241241

242242
return isInitialized;

dotnet/src/webdriver/Safari/SafariDriverService.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
// </copyright>
1818

1919
using OpenQA.Selenium.Internal;
20-
using OpenQA.Selenium.Internal.Logging;
2120
using System;
2221
using System.IO;
2322
using System.Net;
@@ -34,8 +33,6 @@ public sealed class SafariDriverService : DriverService
3433
{
3534
private const string DefaultSafariDriverServiceExecutableName = "safaridriver";
3635

37-
private readonly static ILogger logger = Log.GetLogger<SafariDriverService>();
38-
3936
/// <summary>
4037
/// Initializes a new instance of the <see cref="SafariDriverService"/> class.
4138
/// </summary>
@@ -130,10 +127,7 @@ protected override bool IsInitialized
130127
// check.
131128
catch (Exception ex) when (ex is HttpRequestException || ex is TaskCanceledException)
132129
{
133-
if (logger.IsEnabled(LogEventLevel.Trace))
134-
{
135-
logger.Trace(ex.ToString());
136-
}
130+
// Do nothing. The exception is expected, meaning driver service is not initialized.
137131
}
138132
}
139133
}

0 commit comments

Comments
 (0)