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); }