Skip to content. Skip to navigation

Jan Torbens homepage

You are here: Home public stuff TomcatLog - a simple end-user logfileviewer for the commandline
Document Actions

TomcatLog - a simple end-user logfileviewer for the commandline

by jtheuer last modified 2007-12-28 16:21

Java-developers are not always linux shell experts and most don't want to read manuals in order to view a simple logfile. That's why I wrote tomcatlog.

This litte script is not a big deal, but it even helps the to shell-guru because it selects todays logfile for you:

#/bin/sh

cdate=$(date '+%Y-%m-%d')
file="/var/log/tomcat5/localhost_$cdate.log"
echo "tomcatlog - written by Jan Torben Heuer"
echo "showing file: $file"
echo "press CTRL-C to abort"
echo

tail -f $file

There is only one big disadvantage: Programmers often hack until midnight and the script does not change the the next logfile automatically. Does anyone know, how to implement that?...