diff options
author | Evgeny Alekseev (IBS Group) <ealekseev@ibs.sila.ru> | 2022-09-19 13:53:55 +0300 |
---|---|---|
committer | Evgeny Alekseev (IBS Group) <ealekseev@ibs.sila.ru> | 2022-09-19 13:55:46 +0300 |
commit | 2a760b8ec5f9d2f0e25410e21fc836748884e2c7 (patch) | |
tree | a33d3a32c8367619e85cc66a49dcfde35c73f9d1 | |
parent | c8d19807c31ae2fb4b144ab983432445556000a4 (diff) | |
download | openbmc-2a760b8ec5f9d2f0e25410e21fc836748884e2c7.tar.xz |
IBS:rm SELEntryAdded msgs from phosphor-logging
-rw-r--r-- | meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0011-redfish2phosphor-add-exclude-list.patch | 52 | ||||
-rw-r--r-- | meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend | 3 |
2 files changed, 54 insertions, 1 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0011-redfish2phosphor-add-exclude-list.patch b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0011-redfish2phosphor-add-exclude-list.patch new file mode 100644 index 0000000000..2815ce68ce --- /dev/null +++ b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb/0011-redfish2phosphor-add-exclude-list.patch @@ -0,0 +1,52 @@ +From bfed159b4875a66b24b21d622da705511c533748 Mon Sep 17 00:00:00 2001 +From: "Evgeny Alekseev (IBS Group)" <ealekseev@ibs.sila.ru> +Date: Mon, 19 Sep 2022 13:39:58 +0300 +Subject: [PATCH] redfish2phosphor add exclude list + +--- + src/redfish2phosphor-logs.cpp | 18 ++++++++++++------ + 1 file changed, 12 insertions(+), 6 deletions(-) + +diff --git a/src/redfish2phosphor-logs.cpp b/src/redfish2phosphor-logs.cpp +index 5a19876e..beaf315e 100644 +--- a/src/redfish2phosphor-logs.cpp ++++ b/src/redfish2phosphor-logs.cpp +@@ -23,6 +23,9 @@ using namespace std::literals; + + static constexpr char ARG_DELIMITER = '$'; + static constexpr auto ARG_COUNT = 4; ++ ++static constexpr auto excluded_messages = std::array { "SELEntryAdded" }; ++ + enum class level + { + EMERG = LOG_EMERG, +@@ -34,6 +37,7 @@ enum class level + INFO = LOG_INFO, + DEBUG = LOG_DEBUG, + }; ++ + static level string2severity(std::string_view str) + { + +@@ -194,12 +198,14 @@ int main(int argc, char* argv[]) + BMCWEB_LOG_DEBUG << string_msg; + try + { +- dbusCallMethodNoReturn( +- getBus(), "xyz.openbmc_project.Logging"s, +- "/xyz/openbmc_project/logging"s, +- "xyz.openbmc_project.Logging.Create"s, "Create"s, +- std::string(string_msg), std::string(severity_str), +- std::array<std::pair<std::string, std::string>, 0>{}); ++ if(std::find(excluded_messages.begin(),excluded_messages.end(),std::get<0>(*message)) == excluded_messages.end()) ++ { dbusCallMethodNoReturn( ++ getBus(), "xyz.openbmc_project.Logging"s, ++ "/xyz/openbmc_project/logging"s, ++ "xyz.openbmc_project.Logging.Create"s, "Create"s, ++ std::string(string_msg), std::string(severity_str), ++ std::array<std::pair<std::string, std::string>, 0>{}); ++ } + } + catch (const sdbusplus::exception_t& ex) + { diff --git a/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend index 4d62c06fdc..c7bcffa17e 100644 --- a/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/meta-ibs/meta-common/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -13,7 +13,8 @@ SRC_URI += "\ file://0008-Added-additional-log-about-NTP-sync-status.patch \ file://0009-Added-check-user-priv-before-creating-KVM-and-SOL.patch \ file://0010-Support-setting-IPMI-and-SSH-port-via-redfish.patch \ - " + file://0011-redfish2phosphor-add-exclude-list.patch \ + " EXTRA_OEMESON += "\ -Dredfish-cpu-log=enabled \ |