Use phosphor::logging for the "no action taken" messages
Tested:
Verified that the "no action taken" messages print to the journal.
Change-Id: Ie37228e43232cc1cef133fceed077f589ac7a50f
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/power-control-x86/src/power_control.cpp b/power-control-x86/src/power_control.cpp
index b891c8c..fe56d74 100644
--- a/power-control-x86/src/power_control.cpp
+++ b/power-control-x86/src/power_control.cpp
@@ -1429,7 +1429,8 @@
reset();
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}
@@ -1455,7 +1456,8 @@
setPowerState(PowerState::on);
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}
@@ -1475,7 +1477,8 @@
forcePowerOff();
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}
@@ -1504,7 +1507,8 @@
powerOn();
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}
@@ -1530,7 +1534,8 @@
powerOn();
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}
@@ -1546,7 +1551,8 @@
setPowerState(PowerState::off);
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}
@@ -1564,7 +1570,8 @@
setPowerState(PowerState::on);
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}
@@ -1593,7 +1600,8 @@
powerOn();
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}
@@ -1610,7 +1618,8 @@
powerCycleTimerStart();
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}
@@ -1629,7 +1638,8 @@
setPowerState(PowerState::on);
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}
@@ -1653,7 +1663,8 @@
beep(beepPowerFail);
break;
default:
- std::cerr << "No action taken.\n";
+ phosphor::logging::log<phosphor::logging::level::INFO>(
+ "No action taken.");
break;
}
}