This is an attempt to show the consolidate log from within index.ka, just under the list of deployed applications.
It adds a new endpoint index.ka/tail which uses server-sent events to stream the log to the browser, one log line at a time.
The tailing code, originally written for katon tail, was extracted into a separate module. It exports a class with two primary methods: start and stop (the web endpoint needs to stop tailing when browser drops connection). It emits the events line and error.
UI is pretty simplistic, just putting it out there as starting point.
This is an attempt to show the consolidate log from within
index.ka
, just under the list of deployed applications.It adds a new endpoint
index.ka/tail
which uses server-sent events to stream the log to the browser, one log line at a time.The tailing code, originally written for
katon tail
, was extracted into a separate module. It exports a class with two primary methods:start
andstop
(the web endpoint needs to stop tailing when browser drops connection). It emits the eventsline
anderror
.UI is pretty simplistic, just putting it out there as starting point.
I tested this on io.js 1.5.1