Skip to content

Commit

Permalink
fix(state_machine): added info logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Lluis Santos committed May 4, 2021
1 parent 2ac37f0 commit a067679
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tradingkit/strategy/state_machine_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ def start(self):
def on_event(self, event: Event):
super().on_event(event)
if self.prev != self.state:
logging.debug("StateMachineStrategy.on_event(%s), state: %s" % (str(event.__class__), self.state))
logging.info("StateMachineStrategy.on_event(%s), state: %s" % (str(event.__class__), self.state))
logging.info("State change: %s -> %s" % (self.prev, self.state))
self.prev = self.state
logging.debug("Event: %s: %s" % (event.__class__.__name__, event.payload))
self.state = self.state.on_event(StrategyEvent(event, self))
Expand Down

0 comments on commit a067679

Please sign in to comment.