Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remy/inline-log
Tiny module for capturing stdout/err in the browser.
https://github.com/remy/inline-log
Last synced: about 2 months ago
JSON representation
Tiny module for capturing stdout/err in the browser.
- Host: GitHub
- URL: https://github.com/remy/inline-log
- Owner: remy
- Created: 2016-11-30T14:35:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-04T22:39:34.000Z (almost 8 years ago)
- Last Synced: 2024-08-29T18:33:46.942Z (4 months ago)
- Language: HTML
- Size: 4.88 KB
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Inline log
I wrote a tiny (potentially naff) logger thing that captures all `stdout` and `stderr` and logs in realtime to the browser (using server sent events).
Kinda inspired by the way [Zeit's now](https://zeit.co/now) shows you a loading screen during deployment, but I wanted to get at the stdout logging on my now instances (since you don't have this functionality at the moment).
## Install
Firslty get the module: `npm i -S inline-log`, then in your http server (I'm using Express below):
```js
app.use('/_logger', require('inline-log')({ limit: 50 }))
```That'll capture all the stdout/err and when you visit http://my-site.com/_logger it'll put your logs on the screen (with the last 50 lines). Obviously you can add auth or stuff before the middleware too.