From d943301990367e81bd8752327f27827c9f2abba1 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Fri, 28 Jun 2019 11:24:30 -0700 Subject: [PATCH] Fix error printing code. Test: Induced error and verified the errors print properly in logcat. Change-Id: Ie0e6e71671a8a3e26b4632f93bb2af089a20e2e0 --- libmeminfo/procmeminfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libmeminfo/procmeminfo.cpp b/libmeminfo/procmeminfo.cpp index caf6e863b..a8b43c189 100644 --- a/libmeminfo/procmeminfo.cpp +++ b/libmeminfo/procmeminfo.cpp @@ -312,12 +312,12 @@ bool ProcMemInfo::ReadVmaStats(int pagemap_fd, Vma& vma, bool get_wss, bool use_ cur_page * sizeof(uint64_t)); if (bytes != total_bytes) { if (bytes == -1) { - PLOG(ERROR) << "Failed to read page data at offset " + PLOG(ERROR) << "Failed to read page data at offset 0x" << std::hex << cur_page * sizeof(uint64_t); } else { - LOG(ERROR) << "Failed to read page data at offset " - << cur_page * sizeof(uint64_t) << " read bytes " << sizeof(uint64_t) - << " expected bytes " << bytes; + LOG(ERROR) << "Failed to read page data at offset 0x" << std::hex + << cur_page * sizeof(uint64_t) << std::dec << " read bytes " << bytes + << " expected bytes " << total_bytes; } return false; }