I had a quick thought this morning: I’m always logging in to servers to nose around in their logs. So why not a quick webapp to view the logs? I’ve done this before, but not in Java. So, I wrote tclogview in between stuffing down goose and entertaining the sprog.
To use it, check it out and run mvn package
. Then copy target/tclogview.war
into a ${catalina.base}/webapps
. You’ll also need to set up a user with the tclogview
role. That means adding these two lines to ${catalina.base}/conf/tomcat-users.xml
.
There’s a load of improvements that could be made to it. Some Ajax to implement tail -f
behaviour (using byte ranges for preference) would be lovely. But it seems useful as is.
P.S. In case you’re not happy with git, here’s a source zip and a prebuilt war file.
4 replies on “tclogview”
Hey Dominic,
Thanks a lot for this, I’ve installed this on our servers and the people here love not having to do an ssh-sudo-tail on each box just to have a quick peek in the logs. This will end up saving everyone quite some time.
I’ve added some crude tail functionality, but I’m a bit hesitant to distribute it since there’s no license header in your source files. Also, management at our place might get a bit upset if they find out we’re using software without a clear license. Any chance you could GPL the code? Thanks.
It should all be licensed as BSD. There’s a LICENCE.txt at the top of the repo and the pom also references it. I’m happy to update the source files too though. I’ll go do that…
Thanks dom!
Sorry I missed the LICENSE.txt file, I used the source zip file, and the license wasn’t included in there. But since all the cool folks are using git these days, I think I’ll download it and give it a try 🙂
You can download the source straight from github… Click on the “download source” link on the tclogview page.