From c8209d01f9ddf4c6670caee08073924cb33e447f Mon Sep 17 00:00:00 2001 From: rcoh Date: Wed, 29 Dec 2010 12:43:05 -0500 Subject: setting up some more behaviors to get inherited from --- behaviors/BehaviorChain.py | 8 +++++--- behaviors/DebugBehavior.py | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'behaviors') diff --git a/behaviors/BehaviorChain.py b/behaviors/BehaviorChain.py index 98585c9..ce161f9 100644 --- a/behaviors/BehaviorChain.py +++ b/behaviors/BehaviorChain.py @@ -1,5 +1,6 @@ from operationscore.Behavior import * import util.ComponentRegistry as compReg +import logging as main_log import pdb class BehaviorChain(Behavior): def behaviorInit(self): @@ -20,11 +21,12 @@ class BehaviorChain(Behavior): if behaviorId in self.hooks: #process recursive hook if there is one hookBehavior = compReg.getComponent(self.hooks[behaviorId]) -#we feed its recurrence in as input to the behavior. + #we feed its recurrence in as input to the behavior. (recurrence, hookRecurrence) = \ hookBehavior.immediateProcessInput(recurrence, \ []) if hookRecurrence != []: - print 'Hook recurrences are not currently supported. Implement it yourself or bug russell' - self.feedback[behaviorId] = recurrence + main_log.warn('Hook recurrences are not currently supported. Implement it\ + yourself or bug russell') + self.feedback[behaviorId] = recurrence return response diff --git a/behaviors/DebugBehavior.py b/behaviors/DebugBehavior.py index a00346b..2f8db80 100644 --- a/behaviors/DebugBehavior.py +++ b/behaviors/DebugBehavior.py @@ -1,7 +1,8 @@ from operationscore.Behavior import * +from logger import main_log import pdb class DebugBehavior(Behavior): def processResponse(self, sensorInputs, recursiveInputs): if sensorInputs != []: - print 'Sensor Inputs: ', sensorInputs + main_log.debug('Sensor Inputs: ', sensorInputs) return [] -- cgit v1.2.3