Fix invalid uses of PLOG.
PLOG reports the value of errno. These four PLOG statements are
after functions that are not syscalls, leading to confusing logs
such as "Failed to apply Foo task profile: Success".
Bug: 271196526
Test: N/A
Change-Id: Iede5274d1ceebabec8432527112291ba63dca090
diff --git a/libprocessgroup/task_profiles.cpp b/libprocessgroup/task_profiles.cpp
index 35adf36..4db7372 100644
--- a/libprocessgroup/task_profiles.cpp
+++ b/libprocessgroup/task_profiles.cpp
@@ -815,11 +815,11 @@
profile->EnableResourceCaching(ProfileAction::RCT_PROCESS);
}
if (!profile->ExecuteForProcess(uid, pid)) {
- PLOG(WARNING) << "Failed to apply " << name << " process profile";
+ LOG(WARNING) << "Failed to apply " << name << " process profile";
success = false;
}
} else {
- PLOG(WARNING) << "Failed to find " << name << " process profile";
+ LOG(WARNING) << "Failed to find " << name << " process profile";
success = false;
}
}
@@ -836,11 +836,11 @@
profile->EnableResourceCaching(ProfileAction::RCT_TASK);
}
if (!profile->ExecuteForTask(tid)) {
- PLOG(WARNING) << "Failed to apply " << name << " task profile";
+ LOG(WARNING) << "Failed to apply " << name << " task profile";
success = false;
}
} else {
- PLOG(WARNING) << "Failed to find " << name << " task profile";
+ LOG(WARNING) << "Failed to find " << name << " task profile";
success = false;
}
}