Browse Source

Update app.py

haha 3 years ago
parent
commit
54a15b6c43
1 changed files with 4 additions and 1 deletions
  1. 4 1
      web/app.py

+ 4 - 1
web/app.py

@@ -5,9 +5,12 @@ import time
 
 from flask import Flask, request, json
 import judgement
+import logging
 
 app = Flask(__name__)
 
+logging.basicConfig(level=logging.DEBUG)
+
 
 @app.route('/')
 def hello_world():
@@ -42,7 +45,7 @@ def judge():
     rst = judgement.judge(src_file, 'testcases', td_total, time_limit, memory_limit, language)
     os.remove(src_file)
     shutil.rmtree('testcases')
-    print(time.time()-start)
+    app.logger.info(time.time()-start)
     return rst