Skip to content

log viewer is used to view log files remotely acting as tail -f command and also save them to Mongo DB in runtime.

Notifications You must be signed in to change notification settings

t3chboy/logviewer

Repository files navigation

logviewer

View remote log files and get updates from them like running tail -f command and also save them to MongoDB in runtime.

NodeJS ForTheBadge built-with-love Open Source Love svg3

Log viewer is nodejs and socket.io based application which can be used to view log files stored on remote host. You can also store logs at runtime in Mongo DB. Initially it reads and shows last 1 mb of specified file and later streams data to client on any changes which occurs at eof.

  • Provide absolute file path
  • Provide valid MongoDB credentials

Tech stack

logviewer is build on following stack

  • [node.js] - evented I/O for the backend
  • [Express] - fast node.js network app framework
  • [socket.io] - exchange message via sockets.

Installation

requires Node.js v4+ socket.io v2.0 mongoose v5.0+ express js v4.16+

How to Use

  • Server side

 Browse to the applicatin folder
 $ npm start
  • Client Side

In Browser specify url of the hostname where app is running with port 3000
eg : http://localhost:3000
Things to watch out !!!!

How socket io works

web socket vs socket.io

Everytime page RELOADS new socket session gets created disconecting the old. Mongo DB collections get created based on socket session id for each user, so if page realoads you collection will change based on your new session and old collection being unaffected anymore.

About

log viewer is used to view log files remotely acting as tail -f command and also save them to Mongo DB in runtime.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published