Commit 67f5959e authored by Valentin Reis's avatar Valentin Reis

Adding logging points.

parent e7ac19d0
Pipeline #4407 failed with stages
in 2 minutes and 14 seconds
......@@ -74,8 +74,10 @@ class PowerActuator(object):
return actions
def execute(self, action):
logger.info("changing power limit. command: %r, delta: %r, target: %r", action.command,
action.delta, action.target)
logger.info("changing power limit. command: %r, delta: %r, target: %r",
action.command, action.delta, action.target)
# sensor_manager is a SensorManager, which is not only about sensing
# but also about setting power limits.
self.sensor_manager.set_powerlimit(action.target, action.command)
def update(self, action):
......
......@@ -168,9 +168,11 @@ class Daemon(object):
logger.info("sending sensor message: %r", msg)
def do_control(self):
logger.info("Asking controller to plan for target %s using machine info %s" % (self.target, self.machine_info))
plan = self.controller.planify(self.target, self.machine_info)
logger.info("Controller chose plan " + str(plan))
action, actuator = plan
logger.info("Action target:%s command:%s delta:%s was computed by the power controller." %(action.target,action.command,action.delta))
if action:
self.controller.execute(action, actuator)
self.controller.update(action, actuator)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment