Commit ac722b5b authored by Andre Le's avatar Andre Le Committed by Commit Bot

[CrOS PhoneHub] Remove payload content in all of the logs.

Logging the size instead of the content in all of the payload logs.

Bug: 1106937, 1143033
Change-Id: I4f9861a2d22c53bb80fdfd07b84913f02e2ea0c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2542242
Commit-Queue: Andre Le <leandre@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827902}
parent 445d8a23
...@@ -161,7 +161,8 @@ void SecureChannel::OnMessageReceived(const Connection& connection, ...@@ -161,7 +161,8 @@ void SecureChannel::OnMessageReceived(const Connection& connection,
if (!secure_context_) { if (!secure_context_) {
PA_LOG(WARNING) << "Received unexpected message before authentication " PA_LOG(WARNING) << "Received unexpected message before authentication "
<< "was complete. Feature: " << wire_message.feature() << "was complete. Feature: " << wire_message.feature()
<< ", Payload: " << wire_message.payload(); << ", Payload size: " << wire_message.payload().size()
<< " byte(s)";
return; return;
} }
...@@ -212,8 +213,8 @@ void SecureChannel::OnSendCompleted(const Connection& connection, ...@@ -212,8 +213,8 @@ void SecureChannel::OnSendCompleted(const Connection& connection,
} }
PA_LOG(ERROR) << "Could not send message: {" PA_LOG(ERROR) << "Could not send message: {"
<< "payload: \"" << pending_message_->payload << "\", " << "payload size: " << pending_message_->payload.size()
<< "feature: \"" << pending_message_->feature << "\"" << " byte(s), feature: \"" << pending_message_->feature << "\""
<< "}"; << "}";
pending_message_.reset(); pending_message_.reset();
...@@ -262,7 +263,8 @@ void SecureChannel::ProcessMessageQueue() { ...@@ -262,7 +263,8 @@ void SecureChannel::ProcessMessageQueue() {
PA_LOG(INFO) << "Sending message to " << connection_->GetDeviceAddress() PA_LOG(INFO) << "Sending message to " << connection_->GetDeviceAddress()
<< ": {" << ": {"
<< "feature: \"" << pending_message_->feature << "\", " << "feature: \"" << pending_message_->feature << "\", "
<< "payload: \"" << pending_message_->payload << "\"" << "payload size: " << pending_message_->payload.size()
<< " byte(s)"
<< "}"; << "}";
secure_context_->Encode( secure_context_->Encode(
......
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