Commit 1bc87ec0 authored by Jeroen Dhollander's avatar Jeroen Dhollander Committed by Commit Bot

Log Assistant card HTML on VLOG level 3.

Logging the actual HTML makes debugging easier, but it is very big.
So I've decided to only show it on the most verbose VLOG level (3).

Tests: manually deployed.
Bug: N/A
Change-Id: I08571942cd21774ab2254bb6d907a67bc5e84698
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2336281
Auto-Submit: Jeroen Dhollander <jeroendh@chromium.org>
Commit-Queue: Tao Wu <wutao@chromium.org>
Reviewed-by: default avatarTao Wu <wutao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#794680}
parent e41b9b8f
...@@ -17,9 +17,11 @@ std::string ResolutionToString(AssistantInteractionResolution resolution) { ...@@ -17,9 +17,11 @@ std::string ResolutionToString(AssistantInteractionResolution resolution) {
return result.str(); return result.str();
} }
#define LOG_INTERACTION() \ #define LOG_INTERACTION() \
VLOG(AssistantInteractionLogger::kVLogLevel) \ LOG_INTERACTION_AT_LEVEL(AssistantInteractionLogger::kVLogLevel)
<< "Assistant: " << __FUNCTION__ << ": "
#define LOG_INTERACTION_AT_LEVEL(_level) \
VLOG(_level) << "Assistant: " << __FUNCTION__ << ": "
} // namespace } // namespace
...@@ -54,6 +56,8 @@ void AssistantInteractionLogger::OnHtmlResponse(const std::string& response, ...@@ -54,6 +56,8 @@ void AssistantInteractionLogger::OnHtmlResponse(const std::string& response,
// Displaying fallback instead of the response as the response is filled with // Displaying fallback instead of the response as the response is filled with
// HTML tags and rather large. // HTML tags and rather large.
LOG_INTERACTION() << "with fallback '" << fallback << "'"; LOG_INTERACTION() << "with fallback '" << fallback << "'";
// Display HTML at highest verbosity.
LOG_INTERACTION_AT_LEVEL(3) << "with HTML: " << response;
} }
void AssistantInteractionLogger::OnSuggestionsResponse( void AssistantInteractionLogger::OnSuggestionsResponse(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment