@@ -255,6 +255,11 @@ public void Start()
255255 DriverProcessStartingEventArgs eventArgs = new DriverProcessStartingEventArgs ( this . driverServiceProcess . StartInfo ) ;
256256 this . OnDriverProcessStarting ( eventArgs ) ;
257257
258+ if ( _logger . IsEnabled ( LogEventLevel . Debug ) )
259+ {
260+ _logger . Debug ( "Starting driver service process" ) ;
261+ }
262+
258263 // Important: Start the process and immediately begin reading the output and error streams to avoid IO deadlocks.
259264 this . driverServiceProcess . Start ( ) ;
260265 this . driverServiceProcess . BeginOutputReadLine ( ) ;
@@ -269,6 +274,11 @@ public void Start()
269274 {
270275 throw new WebDriverException ( $ "Cannot start the driver service on { this . ServiceUrl } ") ;
271276 }
277+
278+ if ( _logger . IsEnabled ( LogEventLevel . Debug ) )
279+ {
280+ _logger . Debug ( "Driver service process is started" ) ;
281+ }
272282 }
273283
274284 /// <summary>
@@ -407,6 +417,11 @@ private void Stop()
407417 /// otherwise; <see langword="false"/>.</returns>
408418 private bool WaitForServiceInitialization ( )
409419 {
420+ if ( _logger . IsEnabled ( LogEventLevel . Debug ) )
421+ {
422+ _logger . Debug ( "Waiting until driver service is initialized" ) ;
423+ }
424+
410425 bool isInitialized = false ;
411426 DateTime timeout = DateTime . Now . Add ( this . InitializationTimeout ) ;
412427 while ( ! isInitialized && DateTime . Now < timeout )
@@ -420,6 +435,11 @@ private bool WaitForServiceInitialization()
420435 isInitialized = this . IsInitialized ;
421436 }
422437
438+ if ( _logger . IsEnabled ( LogEventLevel . Debug ) )
439+ {
440+ _logger . Debug ( $ "Driver service initialization status: { isInitialized } ") ;
441+ }
442+
423443 return isInitialized ;
424444 }
425445}
0 commit comments