diff options
| author | Ayushi Smriti <smriti.ayushi@linux.intel.com> | 2019-10-16 16:10:18 +0530 |
|---|---|---|
| committer | Tom Joseph <tomjoseph@in.ibm.com> | 2019-10-18 04:54:58 +0000 |
| commit | 05ad341e2aad6de21dabdc508074677eae19baf2 (patch) | |
| tree | e0f834b87b5a91e8366558d6ed92bae9a71ee3b0 | |
| parent | affadb557aa54d0631db64c8ccbdd320543c5033 (diff) | |
| download | phosphor-host-ipmid-05ad341e2aad6de21dabdc508074677eae19baf2.tar.gz phosphor-host-ipmid-05ad341e2aad6de21dabdc508074677eae19baf2.zip | |
Clean-up: entry code msgs in user_channel cpp files
Cleaning up phosphor logging entry messages from
the usage of ':' to '=' in the whole user_channel
dir cpp files.
Signed-off-by: Ayushi Smriti <smriti.ayushi@linux.intel.com>
Change-Id: Ifa8eb35751279cf6bebd876105b7a4d24deb98a0
| -rw-r--r-- | user_channel/channel_mgmt.cpp | 56 | ||||
| -rw-r--r-- | user_channel/user_mgmt.cpp | 6 | ||||
| -rw-r--r-- | user_channel/usercommands.cpp | 6 |
3 files changed, 34 insertions, 34 deletions
diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp index f2a6354..b56da33 100644 --- a/user_channel/channel_mgmt.cpp +++ b/user_channel/channel_mgmt.cpp @@ -142,7 +142,7 @@ std::string ChannelConfig::getChannelName(const uint8_t chNum) if (!isValidChannel(chNum)) { log<level::ERR>("Invalid channel number.", - entry("ChannelID:%d", chNum)); + entry("ChannelID=%d", chNum)); throw std::invalid_argument("Invalid channel number"); } @@ -160,7 +160,7 @@ int ChannelConfig::convertToChannelNumberFromChannelName( } } log<level::ERR>("Invalid channel name.", - entry("Channel:%s", chName.c_str())); + entry("Channel=%s", chName.c_str())); throw std::invalid_argument("Invalid channel name"); return -1; @@ -172,7 +172,7 @@ std::string ChannelConfig::getChannelNameFromPath(const std::string& path) if (pos == std::string::npos) { log<level::ERR>("Invalid interface path.", - entry("PATH:%s", path.c_str())); + entry("PATH=%s", path.c_str())); throw std::invalid_argument("Invalid interface path"); } std::string chName = @@ -191,7 +191,7 @@ void ChannelConfig::processChAccessPropChange( } catch (const std::invalid_argument& e) { - log<level::ERR>("Exception: ", entry("MSG: %s", e.what())); + log<level::ERR>("Exception: ", entry("MSG=%s", e.what())); return; } @@ -217,7 +217,7 @@ void ChannelConfig::processChAccessPropChange( if (intfPrivStr.empty()) { log<level::ERR>("Invalid privilege string.", - entry("INTF:%s", chName.c_str())); + entry("INTF=%s", chName.c_str())); return; } @@ -230,7 +230,7 @@ void ChannelConfig::processChAccessPropChange( } catch (const std::invalid_argument& e) { - log<level::ERR>("Exception: ", entry("MSG: %s", e.what())); + log<level::ERR>("Exception: ", entry("MSG=%s", e.what())); return; } @@ -613,7 +613,7 @@ ipmi_ret_t ChannelConfig::setChannelAccessPersistData( { log<level::DEBUG>( "Network interface does not exist", - entry("INTERFACE:%s", channelData[chNum].chName.c_str())); + entry("INTERFACE=%s", channelData[chNum].chName.c_str())); return IPMI_CC_UNSPECIFIED_ERROR; } } @@ -804,7 +804,7 @@ Json ChannelConfig::readJsonFile(const std::string& configFile) catch (Json::parse_error& e) { log<level::DEBUG>("Corrupted channel config.", - entry("MSG: %s", e.what())); + entry("MSG=%s", e.what())); throw std::runtime_error("Corrupted channel config file"); } @@ -883,7 +883,7 @@ int ChannelConfig::loadChannelConfig() { log<level::WARNING>( "Channel not configured so loading default.", - entry("CHANNEL_NUM:%d", chNum)); + entry("CHANNEL_NUM=%d", chNum)); // If user didn't want to configure specific channel (say // reserved channel), then load that index with default values. setDefaultChannelConfig(chNum, defaultChannelName); @@ -921,12 +921,12 @@ int ChannelConfig::loadChannelConfig() catch (const Json::exception& e) { log<level::DEBUG>("Json Exception caught.", - entry("MSG:%s", e.what())); + entry("MSG=%s", e.what())); return -EBADMSG; } catch (const std::invalid_argument& e) { - log<level::ERR>("Corrupted config.", entry("MSG:%s", e.what())); + log<level::ERR>("Corrupted config.", entry("MSG=%s", e.what())); return -EBADMSG; } } @@ -980,7 +980,7 @@ int ChannelConfig::readChannelVolatileData() { log<level::ERR>( "Invalid/corrupted volatile channel access file", - entry("FILE: %s", channelVolatileDataFilename)); + entry("FILE=%s", channelVolatileDataFilename)); throw std::runtime_error( "Corrupted volatile channel access file"); } @@ -988,12 +988,12 @@ int ChannelConfig::readChannelVolatileData() } catch (const Json::exception& e) { - log<level::DEBUG>("Json Exception caught.", entry("MSG:%s", e.what())); + log<level::DEBUG>("Json Exception caught.", entry("MSG=%s", e.what())); throw std::runtime_error("Corrupted volatile channel access file"); } catch (const std::invalid_argument& e) { - log<level::ERR>("Corrupted config.", entry("MSG:%s", e.what())); + log<level::ERR>("Corrupted config.", entry("MSG=%s", e.what())); throw std::runtime_error("Corrupted volatile channel access file"); } @@ -1048,19 +1048,19 @@ int ChannelConfig::readChannelPersistData() else { log<level::ERR>("Invalid/corrupted nv channel access file", - entry("FILE:%s", channelNvDataFilename)); + entry("FILE=%s", channelNvDataFilename)); throw std::runtime_error("Corrupted nv channel access file"); } } } catch (const Json::exception& e) { - log<level::DEBUG>("Json Exception caught.", entry("MSG:%s", e.what())); + log<level::DEBUG>("Json Exception caught.", entry("MSG=%s", e.what())); throw std::runtime_error("Corrupted nv channel access file"); } catch (const std::invalid_argument& e) { - log<level::ERR>("Corrupted config.", entry("MSG: %s", e.what())); + log<level::ERR>("Corrupted config.", entry("MSG=%s", e.what())); throw std::runtime_error("Corrupted nv channel access file"); } @@ -1103,7 +1103,7 @@ int ChannelConfig::writeChannelVolatileData() } catch (const std::invalid_argument& e) { - log<level::ERR>("Corrupted config.", entry("MSG: %s", e.what())); + log<level::ERR>("Corrupted config.", entry("MSG=%s", e.what())); return -EINVAL; } @@ -1154,7 +1154,7 @@ int ChannelConfig::writeChannelPersistData() } catch (const std::invalid_argument& e) { - log<level::ERR>("Corrupted config.", entry("MSG: %s", e.what())); + log<level::ERR>("Corrupted config.", entry("MSG=%s", e.what())); return -EINVAL; } @@ -1228,10 +1228,10 @@ int ChannelConfig::setDbusProperty(const std::string& service, catch (const sdbusplus::exception::SdBusError& e) { log<level::DEBUG>("set-property failed", - entry("SERVICE:%s", service.c_str()), - entry("OBJPATH:%s", objPath.c_str()), - entry("INTERFACE:%s", interface.c_str()), - entry("PROP:%s", property.c_str())); + entry("SERVICE=%s", service.c_str()), + entry("OBJPATH=%s", objPath.c_str()), + entry("INTERFACE=%s", interface.c_str()), + entry("PROP=%s", property.c_str())); return -EIO; } @@ -1258,10 +1258,10 @@ int ChannelConfig::getDbusProperty(const std::string& service, catch (const sdbusplus::exception::SdBusError& e) { log<level::DEBUG>("get-property failed", - entry("SERVICE:%s", service.c_str()), - entry("OBJPATH:%s", objPath.c_str()), - entry("INTERFACE:%s", interface.c_str()), - entry("PROP:%s", property.c_str())); + entry("SERVICE=%s", service.c_str()), + entry("OBJPATH=%s", objPath.c_str()), + entry("INTERFACE=%s", interface.c_str()), + entry("PROP=%s", property.c_str())); return -EIO; } return 0; @@ -1288,7 +1288,7 @@ int ChannelConfig::syncNetworkChannelConfig() privilegePropertyString, variant)) { log<level::DEBUG>("Network interface does not exist", - entry("INTERFACE:%s", + entry("INTERFACE=%s", channelData[chNum].chName.c_str())); continue; } diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp index d0dcb38..aa20c2b 100644 --- a/user_channel/user_mgmt.cpp +++ b/user_channel/user_mgmt.cpp @@ -775,7 +775,7 @@ ipmi_ret_t UserAccess::setUserPassword(const uint8_t userId, if (ipmiUserGetUserName(userId, userName) != IPMI_CC_OK) { log<level::DEBUG>("User Name not found", - entry("USER-ID:%d", (uint8_t)userId)); + entry("USER-ID=%d", (uint8_t)userId)); return IPMI_CC_PARM_OUT_OF_RANGE; } std::string passwd; @@ -785,13 +785,13 @@ ipmi_ret_t UserAccess::setUserPassword(const uint8_t userId, std::regex("[a-zA-z_0-9][a-zA-Z_0-9,?:`!\"]*"))) { log<level::DEBUG>("Invalid password fields", - entry("USER-ID:%d", (uint8_t)userId)); + entry("USER-ID=%d", (uint8_t)userId)); return IPMI_CC_INVALID_FIELD_REQUEST; } if (!pamUpdatePasswd(userName.c_str(), passwd.c_str())) { log<level::DEBUG>("Failed to update password", - entry("USER-ID:%d", (uint8_t)userId)); + entry("USER-ID=%d", (uint8_t)userId)); return IPMI_CC_UNSPECIFIED_ERROR; } return IPMI_CC_OK; diff --git a/user_channel/usercommands.cpp b/user_channel/usercommands.cpp index 50fb52b..1d9460c 100644 --- a/user_channel/usercommands.cpp +++ b/user_channel/usercommands.cpp @@ -309,7 +309,7 @@ ipmi_ret_t ipmiGetUserName(ipmi_netfn_t netfn, ipmi_cmd_t cmd, if (ipmiUserGetUserName(req->userId, userName) != IPMI_CC_OK) { // Invalid User ID log<level::DEBUG>("User Name not found", - entry("USER-ID:%d", (uint8_t)req->userId)); + entry("USER-ID=%d", (uint8_t)req->userId)); return IPMI_CC_PARM_OUT_OF_RANGE; } GetUserNameResp* resp = static_cast<GetUserNameResp*>(response); @@ -368,7 +368,7 @@ ipmi_ret_t ipmiSetUserPassword(ipmi_netfn_t netfn, ipmi_cmd_t cmd, if (ipmiUserGetUserName(req->userId, userName) != IPMI_CC_OK) { log<level::DEBUG>("User Name not found", - entry("USER-ID:%d", (uint8_t)req->userId)); + entry("USER-ID=%d", (uint8_t)req->userId)); return IPMI_CC_PARM_OUT_OF_RANGE; } if (req->operation == setPassword) @@ -393,7 +393,7 @@ ipmi_ret_t ipmiSetUserPassword(ipmi_netfn_t netfn, ipmi_cmd_t cmd, if (password != testPassword) { log<level::DEBUG>("Test password failed", - entry("USER-ID:%d", (uint8_t)req->userId)); + entry("USER-ID=%d", (uint8_t)req->userId)); return static_cast<ipmi_ret_t>( IPMISetPasswordReturnCodes::ipmiCCPasswdFailMismatch); } |

