diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-08-22 10:45:28 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-08-22 13:38:51 -0500 |
commit | d953bb25955584410bb29ddac97587b3b633d4bd (patch) | |
tree | b723d5160986fc4a44ab07b6a85ce4858477370a | |
parent | 60b007660c69d635965a187432ad4b87b1c929f9 (diff) | |
download | phosphor-fan-presence-d953bb25955584410bb29ddac97587b3b633d4bd.tar.gz phosphor-fan-presence-d953bb25955584410bb29ddac97587b3b633d4bd.zip |
Create informational logs for properties not found
Fan control is allowed to have properties not be found, so log these as
informational for users. If the property is not found, then any set
speed events related to that property should handle it appropriately.
Resolves openbmc/openbmc#2188
Change-Id: I7c9e5fc8a3291d19ab4b1853af340643d3fa67a2
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
-rw-r--r-- | control/zone.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/control/zone.cpp b/control/zone.cpp index 56c6cb6..4d31ecf 100644 --- a/control/zone.cpp +++ b/control/zone.cpp @@ -20,6 +20,7 @@ #include <xyz/openbmc_project/Common/error.hpp> #include "zone.hpp" #include "utility.hpp" +#include "sdbusplus.hpp" namespace phosphor { @@ -68,7 +69,7 @@ Zone::Zone(Mode mode, if (!_decTimer.running() && _decInterval != seconds::zero()) { _decTimer.start(_decInterval, - phosphor::fan::util::Timer::TimerType::repeating); + util::Timer::TimerType::repeating); } } } @@ -147,7 +148,7 @@ void Zone::requestSpeedIncrease(uint64_t targetDelta) setSpeed(requestTarget); // Start timer countdown for fan speed increase _incTimer.start(_incDelay, - phosphor::fan::util::Timer::TimerType::oneshot); + util::Timer::TimerType::oneshot); } } @@ -205,8 +206,8 @@ void Zone::initEvent(const SetSpeedEvent& event) } catch (const InternalFailure& ife) { - log<level::ERR>( - "Unable to find property: ", + log<level::INFO>( + "Unable to find property", entry("PATH=%s", group.first.c_str()), entry("INTERFACE=%s", std::get<intfPos>(group.second).c_str()), entry("PROPERTY=%s", std::get<propPos>(group.second).c_str())); @@ -302,7 +303,7 @@ void Zone::getProperty(sdbusplus::bus::bus& bus, const std::string& prop, PropertyVariantType& value) { - auto serv = phosphor::fan::util::getService(path, iface, bus); + auto serv = util::SDBusPlus::getService(bus, path, iface); auto hostCall = bus.new_method_call(serv.c_str(), path.c_str(), "org.freedesktop.DBus.Properties", @@ -312,7 +313,7 @@ void Zone::getProperty(sdbusplus::bus::bus& bus, auto hostResponseMsg = bus.call(hostCall); if (hostResponseMsg.is_method_error()) { - log<level::ERR>("Error in host call response for retrieving property"); + log<level::INFO>("Host call response error for retrieving property"); elog<InternalFailure>(); } hostResponseMsg.read(value); |