From 7786dcda270accca62fe68964ee2564555c5e4c2 Mon Sep 17 00:00:00 2001 From: msincenselee Date: Wed, 13 Jul 2016 23:43:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9gateway=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0log=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vn.trader/ctpGateway/ctpGateway.py | 5 +++++ vn.trader/vtMain.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/vn.trader/ctpGateway/ctpGateway.py b/vn.trader/ctpGateway/ctpGateway.py index dcd444ff..ecf01468 100644 --- a/vn.trader/ctpGateway/ctpGateway.py +++ b/vn.trader/ctpGateway/ctpGateway.py @@ -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'] diff --git a/vn.trader/vtMain.py b/vn.trader/vtMain.py index bf24eb1b..b1b6634c 100644 --- a/vn.trader/vtMain.py +++ b/vn.trader/vtMain.py @@ -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():