Socket
Book a DemoInstallSign in
Socket

inline-log

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inline-log

Middleware logger that captures STDOUT + STDERR

latest
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

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 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):

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.

FAQs

Package last updated on 04 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts