Hi all, I have a question regarding rotating log files in websphere. My WAS runs in Windows 2000. our application is running as a huge one and hence we need to rotate the websphere log files every day at abt 12:00 AM. But we cannot delete the original log file and we are getting "Process cannot be accessed because it is being used by another process" in the console. How can we do this in Windows ? Please help Thanks Maya
Maya, WAS 4.0.3 provides this capability. It will be one time change to your application server, I advise you to stop the node itself which owns the application server where your application is deployed. 1.Go to the properties directory (WebSphere/AppServer/properties), open logging.properties, go to the end of this file. 2. Turn com.ibm.ws.ras.SystemOutLogEnable and com.ibm.ws.ras.SystemErrLogEnable to true. 3. com.ibm.ws.ras.SystemOutLogRollover and com.ibm.ws.ras.SystemErrLogRollover relate to size of application server's stdout and stderr files in MB respectively. Provide the setting which suits you. 4. com.ibm.ws.ras.SystemOutLogBackups and com.ibm.ws.ras.SystemErrLogBackups relate to number of archive log files you would like to be available on the system. Once the active log file reaches the size setting provided in step-3, WebSphere archives the current log file and creates a new log file. You can delete the archive log files to free storage without any problem.
Arvind,<br />IBM Certified WAS admin (Test 489, Test 340, Test341)
Joined: Jul 31, 2001
Arvind, Thanks for the reply, I got working on so many other things, so I tried ur comments today only. I checked my logging.properties file and mine doesnt have an entry like com.ibm.ws.ras.SystemOutLogEnable The last statement in my logging.properties is com.ibm.ws.ras.TraceFormat=basic Can u suggest me something here Thanks Maya
I am using WAS 4.0.3 and do have the system out and error log properties available, right after the com.ibm.ws.ras.TraceFormat=basic property. Maybe you can cut and paste this information from another implementation, into this file. Remember to make a backup of this file before modifying anything. It does seem strange though that you do not have anything else in the file past the traceFormat property. Does anybody know what might be going on?
Joined: Jul 31, 2001
Shalini, Hmm.. No idea of whats going on. When we installed websphere it was the WAS4.0 Then we applied the fixpack and upgraded it to WAS 4.0.3. If I login to Websphere admin console and check the version, then it shows as 4.0.3 I already tried adding the 3 lines to the end of the properties file. it didnt roll my files. Thanks Maya
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com