libprocessgroup: Convert incorrect PLOGs to LOGs
PLOG depends on errno being set to a useful value, otherwise it will
print a meaningless error string. A few PLOG call sites occur where
either errno is not set at all, or it is set only some of the time where
there are already PLOG calls closer to where the error occurs. Convert
these PLOG calls to LOG.
Bug: 301871933
Change-Id: Ifa6bd2401f9dd9b84b2506e886336e89bac81bb1
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp
index 0b1794e..9af2682 100644
--- a/libprocessgroup/processgroup.cpp
+++ b/libprocessgroup/processgroup.cpp
@@ -129,7 +129,7 @@
}
if (!attr->GetPathForTask(tid, path)) {
- PLOG(ERROR) << "Failed to find cgroup for tid " << tid;
+ LOG(ERROR) << "Failed to find cgroup for tid " << tid;
return false;
}
@@ -601,7 +601,7 @@
CHECK_GT(initialPid, 0);
if (memControl && !UsePerAppMemcg()) {
- PLOG(ERROR) << "service memory controls are used without per-process memory cgroup support";
+ LOG(ERROR) << "service memory controls are used without per-process memory cgroup support";
return -EINVAL;
}
@@ -623,13 +623,13 @@
static bool SetProcessGroupValue(int tid, const std::string& attr_name, int64_t value) {
if (!isMemoryCgroupSupported()) {
- PLOG(ERROR) << "Memcg is not mounted.";
+ LOG(ERROR) << "Memcg is not mounted.";
return false;
}
std::string path;
if (!CgroupGetAttributePathForTask(attr_name, tid, &path)) {
- PLOG(ERROR) << "Failed to find attribute '" << attr_name << "'";
+ LOG(ERROR) << "Failed to find attribute '" << attr_name << "'";
return false;
}