[Fix]Close #1446
This commit is contained in:
parent
8c07d1de4f
commit
c5accfc44b
@ -77,11 +77,11 @@ class MainEngine:
|
||||
self.add_engine(OmsEngine)
|
||||
self.add_engine(EmailEngine)
|
||||
|
||||
def write_log(self, msg: str):
|
||||
def write_log(self, msg: str, source: str = ""):
|
||||
"""
|
||||
Put log event with specific message.
|
||||
"""
|
||||
log = LogData(msg=msg)
|
||||
log = LogData(msg=msg, gateway_name=source)
|
||||
event = Event(EVENT_LOG, log)
|
||||
self.event_engine.put(event)
|
||||
|
||||
|
@ -14,8 +14,8 @@ ACTIVE_STATUSES = set([Status.SUBMITTING, Status.NOTTRADED, Status.PARTTRADED])
|
||||
@dataclass
|
||||
class BaseData:
|
||||
"""
|
||||
Any data object needs a gateway_name as source or
|
||||
destination and should inherit base data.
|
||||
Any data object needs a gateway_name as source
|
||||
and should inherit base data.
|
||||
"""
|
||||
|
||||
gateway_name: str
|
||||
|
Loading…
Reference in New Issue
Block a user