Browse Source

测试打印日志2

locky 4 years ago
parent
commit
9653ffaae1
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Controller/CDKController.py

+ 4 - 1
Controller/CDKController.py

@@ -12,6 +12,7 @@
 @Contact: chanjunkai@163.com
 """
 import json
+import logging
 import time
 import urllib
 import uuid
@@ -123,7 +124,8 @@ class CDKView(View):
             searchVal = order.strip()
         elif is_activate:
             searchVal = is_activate.strip()
-
+        logger = logging.getLogger('info')
+        logger.info('CDK测试打印1: {}'.format(time.localtime(time.time())))
         if page and line:
             cdk_qs = CDKcontextModel.objects.filter().all()  # values('cdk','create_time','valid_time','is_activate','rank__id','order__id')
             if searchVal:
@@ -153,6 +155,7 @@ class CDKView(View):
                 'datas': list(cdk_qs),
                 'count': count
             }
+            logger.info('CDK测试打印2: {}'.format(time.localtime(time.time())))
             return response.json(0, res)
         else:
             return response.json(444, 'page,line')