summaryrefslogtreecommitdiff
path: root/testing/SendLog
diff options
context:
space:
mode:
authorHrishi Hiraskar2016-09-04 11:51:12 +0530
committerGitHub2016-09-04 11:51:12 +0530
commitb688887d0371e270fb42d40449b0d2fb56819e22 (patch)
tree3c9c3f07d150616ba0b198834031d56d18abedea /testing/SendLog
parentffda6d1b4730686f4a2be7baf316c05235a99b3e (diff)
downloadxcos-on-web-b688887d0371e270fb42d40449b0d2fb56819e22.tar.gz
xcos-on-web-b688887d0371e270fb42d40449b0d2fb56819e22.tar.bz2
xcos-on-web-b688887d0371e270fb42d40449b0d2fb56819e22.zip
Update SendLog.py
Diffstat (limited to 'testing/SendLog')
-rwxr-xr-xtesting/SendLog/SendLog.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/SendLog/SendLog.py b/testing/SendLog/SendLog.py
index ab7930d..b96f24e 100755
--- a/testing/SendLog/SendLog.py
+++ b/testing/SendLog/SendLog.py
@@ -14,12 +14,12 @@ app = Flask(__name__)
def event_stream():
# Open the log file
log_dir = "../../bin/" # Log file directory
- log_name = "scilab-log-0.txt" # Log file name
+ log_name = "scilab-log-0.txt" # Log file name
logfile = open(log_dir + log_name, "r")
# Seek file pointer to the end of file
logfile.seek(0,2)
# Start sending log
- LOOK_DELAY = 0.01 # Delay time to look for new line (in s)
+ LOOK_DELAY = 0.01 # Delay time to look for new line (in s)
while 1:
line = logfile.readline()
if not line:
@@ -28,7 +28,7 @@ def event_stream():
gevent.sleep(LOOK_DELAY)
continue
print(line)
- yield "event: log\ndata: "+" "+line+"\n\n";
+ yield "event: log\ndata: "+line+"\n\n";
@app.route('/SendLog')
def sse_request():
@@ -40,7 +40,7 @@ def page():
return render_template('index.html')
if __name__ == '__main__':
- # Set server address 127.0.0.1:8080/
+ # Set server address 127.0.0.1:8001/
http_server = WSGIServer(('127.0.0.1', 8001), app)
http_server.serve_forever()