File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 23
23
using System . Net ;
24
24
using System . Net . Http ;
25
25
using System . Threading . Tasks ;
26
+ using OpenQA . Selenium . Internal . Logging ;
26
27
using OpenQA . Selenium . Remote ;
27
28
28
29
namespace OpenQA . Selenium
@@ -41,6 +42,7 @@ public abstract class DriverService : ICommandServer
41
42
private bool isDisposed ;
42
43
private Process driverServiceProcess ;
43
44
private TimeSpan initializationTimeout = TimeSpan . FromSeconds ( 20 ) ;
45
+ private readonly static ILogger logger = Log . GetLogger < DriverService > ( ) ;
44
46
45
47
/// <summary>
46
48
/// Initializes a new instance of the <see cref="DriverService"/> class.
@@ -216,6 +218,7 @@ protected virtual bool IsInitialized
216
218
get
217
219
{
218
220
bool isInitialized = false ;
221
+
219
222
try
220
223
{
221
224
using ( var httpClient = new HttpClient ( ) )
@@ -236,7 +239,7 @@ protected virtual bool IsInitialized
236
239
}
237
240
catch ( Exception ex ) when ( ex is HttpRequestException || ex is TaskCanceledException )
238
241
{
239
- Console . WriteLine ( ex . Message ) ;
242
+ logger . Trace ( ex . ToString ( ) ) ;
240
243
}
241
244
242
245
return isInitialized ;
Original file line number Diff line number Diff line change 16
16
// limitations under the License.
17
17
// </copyright>
18
18
19
+ using OpenQA . Selenium . Internal . Logging ;
19
20
using System ;
20
21
using System . Globalization ;
21
22
using System . IO ;
@@ -28,6 +29,8 @@ namespace OpenQA.Selenium.Internal
28
29
/// </summary>
29
30
internal static class FileUtilities
30
31
{
32
+ private static readonly ILogger logger = Log . GetLogger ( typeof ( FileUtilities ) ) ;
33
+
31
34
/// <summary>
32
35
/// Recursively copies a directory.
33
36
/// </summary>
@@ -99,7 +102,7 @@ public static void DeleteDirectory(string directoryToDelete)
99
102
100
103
if ( Directory . Exists ( directoryToDelete ) )
101
104
{
102
- Console . WriteLine ( "Unable to delete directory '{0 }'" , directoryToDelete ) ;
105
+ logger . Trace ( $ "Unable to delete directory '{ directoryToDelete } '") ;
103
106
}
104
107
}
105
108
Original file line number Diff line number Diff line change 23
23
using System . Text ;
24
24
using System . Threading . Tasks ;
25
25
using OpenQA . Selenium . Internal ;
26
+ using OpenQA . Selenium . Internal . Logging ;
26
27
27
28
namespace OpenQA . Selenium . Safari
28
29
{
@@ -35,6 +36,8 @@ public sealed class SafariDriverService : DriverService
35
36
36
37
private bool useLegacyProtocol ;
37
38
39
+ private readonly static ILogger logger = Log . GetLogger < SafariDriverService > ( ) ;
40
+
38
41
/// <summary>
39
42
/// Initializes a new instance of the <see cref="SafariDriverService"/> class.
40
43
/// </summary>
@@ -150,7 +153,7 @@ protected override bool IsInitialized
150
153
// check.
151
154
catch ( Exception ex ) when ( ex is HttpRequestException || ex is TaskCanceledException )
152
155
{
153
- Console . WriteLine ( ex ) ;
156
+ logger . Trace ( ex . ToString ( ) ) ;
154
157
}
155
158
}
156
159
}
You can’t perform that action at this time.
0 commit comments