diff --git a/app/src/fan/FanCurve.cxx b/app/src/fan/FanCurve.cxx index d673543..43b9b19 100644 --- a/app/src/fan/FanCurve.cxx +++ b/app/src/fan/FanCurve.cxx @@ -1,5 +1,8 @@ +#include #include +#include + #include using namespace std; @@ -8,7 +11,6 @@ FanCurve::FanCurve(std::vector steps, std::vector> sensors, std::vector> fans) : mSteps(steps), mTempSensors(sensors), mFans(fans) { - cout << "Initialized Fan Curve:" << endl; PrintInfo(); } @@ -52,28 +54,32 @@ int FanCurve::AggregateTemperature() { } void FanCurve::PrintInfo() { + BOOST_LOG_FUNCTION() + + BOOST_LOG_TRIVIAL(info) << "### Fan curve:"; + stringstream sStream; - cout << "Steps: "; + sStream << "Steps: "; for (auto s : mSteps) { sStream << "[ " << s.Temp << "C, " << s.Percent << "% ] "; } - cout << sStream.str() << endl; + BOOST_LOG_TRIVIAL(info) << sStream.str(); sStream.str(string()); - cout << "Sensors: "; + sStream << "Sensors: "; for (auto s : mTempSensors) { sStream << s->toString() << ", "; } - cout << sStream.str() << endl; + BOOST_LOG_TRIVIAL(info) << sStream.str(); sStream.str(string()); - cout << "Fans: "; + sStream << "Fans: "; for (auto s : mFans) { sStream << s->toString() << ", "; } - cout << sStream.str() << endl; + BOOST_LOG_TRIVIAL(info) << sStream.str(); } diff --git a/app/src/pwm/PWMControl.cxx b/app/src/pwm/PWMControl.cxx index 54ffe1b..11f40aa 100644 --- a/app/src/pwm/PWMControl.cxx +++ b/app/src/pwm/PWMControl.cxx @@ -36,7 +36,7 @@ PWMControl::PWMControl(string controlPath) : mControlPath(controlPath) { } PWMControl::~PWMControl() { - cout << "Cleanup" << endl; + BOOST_LOG_TRIVIAL(trace) << "Cleanup"; Reset(); }