Commit 4c5fdbe0 authored by proberge's avatar proberge Committed by Commit Bot

Chrome Cleaner test child process logger: add end of logs statement

The logging was a bit confusing if there were no child process logs.
This makes things a bit clearer.

Bug: 1030333
Change-Id: I26f0fdc47686ce1b79a2c85e8f3a9bc0bab07567
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1955036Reviewed-by: default avatarJoe Mason <joenotcharles@chromium.org>
Commit-Queue: proberge <proberge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722983}
parent 3573d8a7
...@@ -81,10 +81,16 @@ void ChildProcessLogger::DumpLogs() const { ...@@ -81,10 +81,16 @@ void ChildProcessLogger::DumpLogs() const {
std::vector<base::StringPiece> lines = std::vector<base::StringPiece> lines =
base::SplitStringPiece(log_file_contents, "\n", base::TRIM_WHITESPACE, base::SplitStringPiece(log_file_contents, "\n", base::TRIM_WHITESPACE,
base::SPLIT_WANT_NONEMPTY); base::SPLIT_WANT_NONEMPTY);
if (lines.empty()) {
LOG(ERROR) << "Child process log file is empty";
return;
}
LOG(ERROR) << "Dumping child process logs"; LOG(ERROR) << "Dumping child process logs";
for (const auto& line : lines) { for (const auto& line : lines) {
LOG(ERROR) << "Child process: " << line; LOG(ERROR) << "Child process: " << line;
} }
LOG(ERROR) << "Finished dumping child process logs";
} }
} // namespace chrome_cleaner } // namespace chrome_cleaner
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