View remote log files and get updates from them like running tail -f command and also save them to MongoDB in runtime.
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
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.
requires Node.js v4+ socket.io v2.0 mongoose v5.0+ express js v4.16+
Browse to the applicatin folder
$ npm start
In Browser specify url of the hostname where app is running with port 3000
eg : http://localhost:3000
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.