diff --git a/paddle/utils/flags_native.cc b/paddle/utils/flags_native.cc index ea7445f7144dcc01e43b6ff66bc2b53dd55fb798..c0351a4f3b220dbacc5624aee64a924a8027e03a 100644 --- a/paddle/utils/flags_native.cc +++ b/paddle/utils/flags_native.cc @@ -297,8 +297,9 @@ void Flag::SetValueFromString(const std::string& value) { void FlagRegistry::RegisterFlag(Flag* flag) { auto iter = flags_.find(flag->name_); if (iter != flags_.end()) { - LOG_FLAG_FATAL_ERROR("illegal RegisterFlag, flag \"" + flag->name_ + - "\" has been defined in " + iter->second->file_); + LOG_FLAG_FATAL_ERROR("flag multiple definition, flag \"" + flag->name_ + + "\" was defined both in " + iter->second->file_ + + " and " + flag->file_); } else { std::lock_guard lock(mutex_); flags_[flag->name_] = flag;