Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(986)

Unified Diff: webrtc/system_wrappers/source/trace_impl.cc

Issue 1256773002: When we trace to file, add eol of each trace message. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address comments Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/system_wrappers/source/trace_impl.cc
diff --git a/webrtc/system_wrappers/source/trace_impl.cc b/webrtc/system_wrappers/source/trace_impl.cc
index 25da5a0c9ac61ee9fd718fc863b705ae7b16a815..ffe79b9862e151a3227a2ca38bbf70967b917d9a 100644
--- a/webrtc/system_wrappers/source/trace_impl.cc
+++ b/webrtc/system_wrappers/source/trace_impl.cc
@@ -402,7 +402,12 @@ void TraceImpl::WriteToFile(const char* msg, uint16_t length) {
row_count_text_++;
}
}
- trace_file_->Write(msg, length);
+
+ char trace_message[WEBRTC_TRACE_MAX_MESSAGE_SIZE];
+ memcpy(trace_message, msg, length);
+ trace_message[length] = 0;
+ trace_message[length - 1] = '\n';
+ trace_file_->Write(trace_message, length);
row_count_text_++;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698