def write_log(self, msg: str, algo: AlgoTemplate = None): """""" if algo: msg = f"{algo.algo_name}:{msg}" log = LogData(msg=msg, gateway_name=APP_NAME) event = Event(EVENT_ALGO_LOG, data=log) self.event_engine.put(event)
def write_log(self, msg: str): """""" log = LogData( msg=msg, gateway_name=APP_NAME ) event = Event(EVENT_SPREAD_LOG, log) self.event_engine.put(event)
def write_log(self, msg: str, strategy: CtaTemplate = None): """ Create cta engine log event. """ if strategy: msg = f"{strategy.strategy_name}: {msg}" log = LogData(msg=msg, gateway_name=APP_NAME) event = Event(type=EVENT_CTA_LOG, data=log) self.event_engine.put(event)
def write_log(self, msg: str) -> None: """""" log = LogData(msg=msg, gateway_name=GATEWAY_NAME) self.put_event(EVENT_LOG, log)
def write_log(self, msg: str): """""" log = LogData(msg=msg, gateway_name="RiskManager") event = Event(type=EVENT_LOG, data=log) self.event_engine.put(event)