From cd138fce628b59e2c0c394e07e603385c3bcf30f Mon Sep 17 00:00:00 2001 From: Nikolay Borisenko <22616990+nvborisenko@users.noreply.github.com> Date: Tue, 17 Dec 2024 21:51:45 +0300 Subject: [PATCH] [dotnet] [cdp] Add more internal logs around CDP implementation Related to #14903 --- dotnet/src/webdriver/DevTools/DevToolsSession.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dotnet/src/webdriver/DevTools/DevToolsSession.cs b/dotnet/src/webdriver/DevTools/DevToolsSession.cs index b58de1097888c..4ec62289873db 100644 --- a/dotnet/src/webdriver/DevTools/DevToolsSession.cs +++ b/dotnet/src/webdriver/DevTools/DevToolsSession.cs @@ -542,6 +542,11 @@ private void MonitorMessageQueue() } catch (Exception ex) { + if (logger.IsEnabled(LogEventLevel.Error)) + { + logger.Error($"Unexpected error occured while processing message: {ex}"); + } + LogError("Unexpected error occured while processing message: {0}", ex); } } @@ -578,6 +583,11 @@ private void ProcessMessage(string message) } else { + if (logger.IsEnabled(LogEventLevel.Error)) + { + logger.Error($"Recieved Unknown Response {commandId}: {message}"); + } + LogError("Recieved Unknown Response {0}: {1}", commandId, message); }