Remove double filename logging
update_engine receives logs from two sources: liblog and libchrome.
liblog sends the raw logging message, but libchrome sends the log
message prepended with filename information. Since we also prepend log
messages with filenames, this results in duplicate filenames when
message is from libchrome.
Test: th
Change-Id: I1eb8686065f551ddde54c3ff16a36c0c1a41dd01
diff --git a/aosp/logging_android.cc b/aosp/logging_android.cc
index 8b5465a..5940f78 100644
--- a/aosp/logging_android.cc
+++ b/aosp/logging_android.cc
@@ -265,7 +265,7 @@
} else {
// This will eventually be redirected to CombinedLogger.
// Use nullptr as tag so that liblog infers log tag from getprogname().
- if (file == nullptr || file[0] == 0 || line == 0) {
+ if (file == nullptr || file[0] == 0 || line == 0 || message_start != 0) {
__android_log_write(priority, nullptr /* tag */, str.c_str());
} else {
__android_log_print(priority,