views:

202

answers:

1

I'm working on a Vista workstation purely out of stubbornness. Not that I like it, but it's what IT put on the machine when I arrived, and I'm determined to make it work somehow.

I build a webapp and deploy it under Tomcat 5.5, starting it from the command line, not as a service.

The problem is that the log files written by Tomcat and log4j remain zero length while Tomcat is running. If I need to visit my log files to inspect an exception, I have to stop Tomcat. At that time the log files are visible on disk and available for viewing.

I've been assuming that I'm battling Vista in this instance, that its disk I/O is caching the file writes. I've found no options or configuration that would disable the write buffering.

Any suggestions?

A: 

Copy the files to a new directory. They should now have a size and you can view them with the editor of your choice. The file stays open for writing, and until the file is closed, you can't do much with it. Copying, however, somehow circumnavigates this problem.

Stefan Kendall
For that matter, you can copy to the same directory and open "Copy of xyz.txt"
Stefan Kendall
Interesting how that works ... I guess making it available for "tail" is too much to ask for. (The "tail.exe" that comes with the Windows git installation is a good one.)
Mojo