diff --git a/vnpy/trader/vtEngine.py b/vnpy/trader/vtEngine.py index 1aec3a7f..f0122ace 100644 --- a/vnpy/trader/vtEngine.py +++ b/vnpy/trader/vtEngine.py @@ -340,7 +340,8 @@ class MainEngine(object): #---------------------------------------------------------------------- def registerLogEvent(self, eventType): """注册日志事件监听""" - self.eventEngine.register(eventType, self.logEngine.processLogEvent) + if self.logEngine: + self.eventEngine.register(eventType, self.logEngine.processLogEvent) #---------------------------------------------------------------------- def convertOrderReq(self, req):