Merge "libprocessgroup: Change LogFailures to string"
This commit is contained in:
commit
32c68d4e33
1 changed files with 3 additions and 3 deletions
|
@ -518,10 +518,10 @@ bool TaskProfiles::Load(const CgroupMap& cg_map, const std::string& file_name) {
|
|||
std::string attr_filepath = params_val["FilePath"].asString();
|
||||
std::string attr_value = params_val["Value"].asString();
|
||||
if (!attr_filepath.empty() && !attr_value.empty()) {
|
||||
const Json::Value& logfailures = params_val["LogFailures"];
|
||||
bool attr_logfailures = logfailures.isNull() || logfailures.asBool();
|
||||
std::string attr_logfailures = params_val["LogFailures"].asString();
|
||||
bool logfailures = attr_logfailures.empty() || attr_logfailures == "true";
|
||||
profile->Add(std::make_unique<WriteFileAction>(attr_filepath, attr_value,
|
||||
attr_logfailures));
|
||||
logfailures));
|
||||
} else if (attr_filepath.empty()) {
|
||||
LOG(WARNING) << "WriteFile: invalid parameter: "
|
||||
<< "empty filepath";
|
||||
|
|
Loading…
Reference in a new issue