typicode / katon

(use hotel instead)
https://github.com/typicode/hotel
MIT License
683 stars 28 forks source link

Web tail #67

Closed assaf closed 9 years ago

assaf commented 9 years ago

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.

I tested this on io.js 1.5.1

typicode commented 9 years ago

That's really cool, thanks!