项目作者: aaabhilash97

项目描述 :
Tail server logs to browser console.
高级语言: JavaScript
项目地址: git://github.com/aaabhilash97/log-streamer.git
创建时间: 2018-07-31T13:54:40Z
项目社区:https://github.com/aaabhilash97/log-streamer

开源协议:MIT License

下载


Log Viewer

Log Viewer is a Node.js application for viewing server logs in the browser console.

Prerequisite

  1. Node.js version >= 8.x.x

Quick Start

  1. git clone https://github.com/aaabhilash97/log-streamer.git
  2. npm install
  3. npm start -- -u user -p pass -f /var/log/nginx/access.log -P 3005

Open http://localhost:3005/stream/logs in your browser and open Developer tools.
In Dev tool console type connect("user", "pass", "app"). This will establish the websocket connection. And start to print logs in console.

Log stream Screenshot

Usage

  1. usage: node app.js [-h] [-v] [-u USERNAME] [-p PASSWORD] [-P PORT] [-o ORIGIN]
  2. [-f FILE]
  3. Log streamer
  4. Optional arguments:
  5. -h, --help Show this help message and exit.
  6. -v, --version Show program's version number and exit.
  7. -u USERNAME, --username USERNAME
  8. Username to connect
  9. -p PASSWORD, --password PASSWORD
  10. password to connect
  11. -P PORT, --port PORT Port to listen
  12. -o ORIGIN, --origin ORIGIN
  13. Allowed origin
  14. -f FILE, --file FILE file to stream

Licence

This software is provided free of charge and without restriction under the MIT License