修改gateway,增加log记录

This commit is contained in:
msincenselee 2016-07-13 23:43:16 +08:00
parent 2075fe9866
commit 7786dcda27
2 changed files with 6 additions and 1 deletions

View File

@ -17,6 +17,8 @@ from vnctptd import TdApi
from ctpDataType import *
from vtGateway import *
import logging
# 以下为一些VT类型和CTP类型的映射字典
# 价格类型映射
@ -538,6 +540,9 @@ class CtpTdApi(TdApi):
#----------------------------------------------------------------------
def onRspOrderInsert(self, data, error, n, last):
"""发单错误(柜台)"""
logging.info(u'onRspOrderInsert')
err = VtErrorData()
err.gatewayName = self.gatewayName
err.errorID = error['ErrorID']

View File

@ -11,7 +11,7 @@ from uiMainWindow import *
from setup_logger import setup_logger
setup_logger(filename='logs/vnpy_{0}.log'.format(datetime.now().strftime('%m%d_%H%M')), debug=True)
setup_logger(filename='logs/vnpy_{0}.log'.format(datetime.now().strftime('%m%d_%H%M')), debug=False)
# ----------------------------------------------------------------------
def main():