tail -f in the browser
Monitor log files from your web browser. Try the live demo!
Disclaimer: This program falls strictly under the category of "things I wrote for myself,
and then stuck on the web in case they happen to be useful to someone else!" Proceed with caution.
- Configurable refresh rate
- Regular expression filter and inverse filter
- Create rules for coloring lines that match a pattern
- Display raw logs or format logs into columns. Support for formatting Apache logs (Debian default format) is included. If you want to format other log formats, you'll need to write your own!
- Support for logs not readable by the web server process due to permissions (
- Reasonably modern PHP
- Linux (or similar)
passthru() function enabled. Or you could write a replacement for
tail.sh in pure PHP if you really wanted.
Download / Configure
- Download the archive and extract somewhere in your HTTP folder
tail.sh to point to the log file you want to monitor
- If your web server process has read permissions on the log:
tail.php and remove the
- Consider moving
tail.sh to someplace outside the public HTTP structure and updating
tail.php with the new location
- If your web server process does NOT have read permissions on the log:
sudo chown root:root tail.sh
sudo chmod 700 tail.sh
- Add something like this to the sudoers file using
ALL ALL = (root) NOPASSWD: /path/to/tail.sh
log.js to add color rules or change the log formatting.