Since I instantiate a new PrintWriter everytime I call the method, it creates or overwrites the file, right?
Right. So just create the PrintWriter once and pass it around, rather than passing the file name around and creating the PrintWriter many times.
Or better still, write a method that writes log information to that PrintWriter and have any method that wants to log call that method. (This is called "encapsulation" if you didn't know that.) Then you can change your logging from PrintWriter to some other technique without having to change the signature of dozens of other methods.
[ November 09, 2006: Message edited by: Paul Clapham ]