You do not like to watch the logs in the console or you do not allow them to love, but somehow you need to monitor the progress of affairs?
PuperGrep is a log viewer in a browser that works like
tail -F ,
grep and highlights the most interesting things in your browser. Or even on your android, iPhone or iPad.

')
Opportunities
- Realtime viewing logs.
- The ability to watch only interesting lines on the list of regexps.
- Ability to highlight a particularly interesting line on the list of regekspov.
- Ways to group lists of regexps for filtering or highlighting through or (at least one) or and (all).
- Adjust the number of lines displayed on the screen.
- Ability to pause the log to view the most interesting.
- Fast switching between logs with search by log name.
- Font size for hens and eagles.
- Links to specific logs with all filtering, backlight and display settings (for bookmarks and sending to friends on VKontakte).
- Auto-highlighting of links in the logs
- The html log mode (you can display the latest images uploaded to your service).
- Highlight activity in the log, even if you have filtered all that is possible.
Impossibility
- Scroll back and forth on the log to infinity. Only realtime.
- Download the entire logs (we have nginx + autoindex for this).
Using
All good is written on node.js + socket.io + twitter bootstrap.
To start, we execute the following commands:
mkdir ~ / mypupergrep
cd ~ / mypupergrep
mkdir node_modules
npm install pupergrep
Because pupergrep is just a npm module, we will need to write a simple server and save it in
~ / mypupergrep / server.js :
(function () {
var PuperGrep = require ("pupergrep"),
puper = new PuperGrep (),
manager = puper.getLogReaderManager ();
// here my_cool_log is the name of the log, and / var / log / my_cool_log is the path to it
manager.addLog ("my_cool_log", "/ var / log / my_cool_log", function (error) {
if (error) {
console.log ("Error adding test log", error);
return;
}
// if your log may be interpreted as html:
// manager.setLogType ("my_cool_log", "html");
puper.listen (8080, "127.0.0.1");
});
}) ();
Run by the command:
node server.js
Now at
http://127.0.0.1:8080/ your own PuperGrep will be visible with the my_cool_log log.
If you use in production, it is reasonable to put nginx in front of your server, which will deal with user authorization or even static distribution. This is on the
project page . It should be noted that nginx does not support websockets (for the time being) and you have to wait a couple of seconds each time you open the page to switch to xhr-polling.
The end of the ends
On the
project page on Github you can read more. You can also leave your pull request, I will only be glad.
Demo , only uptime log is actively written there.