Skip to content

Commit

Permalink
Add changes per peer review
Browse files Browse the repository at this point in the history
  • Loading branch information
zbud-msft committed Aug 25, 2022
1 parent 57e6aea commit 5627117
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sonic-eventd/rsyslog_plugin/rsyslog_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ bool RsyslogPlugin::onMessage(string msg, lua_State* luaState) {

void parseParams(vector<string> params, vector<EventParam>& eventParams) {
for(long unsigned int i = 0; i < params.size(); i++) {
if(params[i].empty()) { continue; }
if(params[i].empty()) {
SWSS_LOG_ERROR("Empty param provided in regex file\n");
continue;
}
EventParam ep = EventParam();
auto delimPos = params[i].find(':');
if(delimPos == string::npos) { // no lua code
Expand All @@ -36,7 +39,7 @@ void parseParams(vector<string> params, vector<EventParam>& eventParams) {
ep.paramName = params[i].substr(0, delimPos);
ep.luaCode = params[i].substr(delimPos + 1);
if(ep.luaCode.empty()) {
SWSS_LOG_INFO("Lua code missing after :");
SWSS_LOG_ERROR("Lua code missing after :\n");
}
}
eventParams.push_back(ep);
Expand Down

0 comments on commit 5627117

Please sign in to comment.