Skip to content

Commit

Permalink
Remove redundant syslog messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Jun 16, 2022
1 parent 4468e11 commit 0eec661
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sonic-eventd/rsyslog_plugin/rsyslog_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ bool RsyslogPlugin::createRegexList() {
}
m_parser->m_expressions.push_back(expression);
}
if(m_parser->m_expressions.empty()) {
SWSS_LOG_ERROR("Empty list of regex expressions.\n");
return false;
}
regex_file.close();
return true;
}
Expand All @@ -65,9 +69,7 @@ bool RsyslogPlugin::createRegexList() {
if(line.empty()) {
continue;
}
if(!onMessage(line)) {
SWSS_LOG_DEBUG("RsyslogPlugin was not able to parse or publish the log message: %s\n", line.c_str());
}
onMessage(line);
}
}

Expand Down

0 comments on commit 0eec661

Please sign in to comment.