Chris,
> -----Original Message----- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: Friday, August 14, 2009 10:59 AM > To: Tomcat Users List > Subject: Re: Clearing the catalina.out file > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > George, > > On 8/14/2009 12:48 PM, George Sexton wrote: > > Logrotate isn't going to work because the file is never re-set. > > Typically, when you use LogRotate with something like apache you send > > a command to re-start it. > > Sure it will. Check the "copytruncate" option. That's an interesting option. It seems fraught with danger, but I tested it and it does work. > > > So, if you want to reset catalina.out you need to re-start tomcat. > > No, you don't. Why do people make statements like this? You can try it > yourself. It takes like 5 seconds: > > $ bin/startup.sh > (observe log file with messages) > $ > logs/catalina.out > (observe empty log file) > (redeploy an application, or do something that will generate output in > catalina.out) > (observe new messages in catalina.out) > > What part of that doesn't work? > > - -chris The part about new data appearing. On one of my production servers, I erased catalina.out. I then invoked a JSP that generated output to system.out. The file catalina.out did not magically appear. No data was magically written to the file. I went into proc for the PID for JSVC, and looked at the File Descriptors. Sure enough, if I look in the FD directory, FD 1 shows deleted. If I examine the contents of the file descriptor, the test data is appended to the end of the file. It doesn't work. I make these statements because I know what I observe. I've also been using Linux since something like 1997 so I've got a fair amount of experience there too. Perhaps we observe different results because I'm using JSVC. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org