How to clear out log files when restarting WebSphere Application Server

Technote (FAQ)
Problem
How do you clear the log files for the WebSphere Application Servers and WebSphere Admin Server when they startup?
Solution
When starting or restarting the WebSphere Application Server, the standard out and standard error files are not cleared. Placing a "!" before the path to the output file everytime the application server starts or restarts the file WILL be cleared out.

This also works to clear the admin server output files. Place the "!" after the "=" and before the path and file name.

Examples:
Application Server:
  1. Start the Admin Console and select the application server settings page.
  2. Edit where you specify the output file names in the Admin Console (e.g. stderr and stdout) and change it from:
  • Windows:
    C:\WebSphere\AppServer/logs/Default_Server_stdout.log
    to
    !C:\WebSphere\AppServer/logs/Default_Server_stdout.log
  • Unix:
    /opt/WebSphere/AppServer/logs/Default_Server_stdout.log
    to
    !/opt/WebSphere/AppServer/logs/Default_Server_stdout.log

Admin Server:
  1. Edit the admin.config file
  2. Change the output file specification from:
    • Windows:
      com.ibm.ejs.sm.adminServer.traceFile=C:/WebSphere/AppServer/logs/tracefile
      to
      com.ibm.ejs.sm.adminServer.traceFile=!C:/WebSphere/AppServer/logs/tracefile
    • Unix:
      com.ibm.ejs.sm.adminServer.traceFile=/opt/WebSphere/AppServer/logs/tracefile
      to
      com.ibm.ejs.sm.adminServer.traceFile=!/opt/WebSphere/AppServer/logs/tracefile











Document Information

Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, General
Operating system(s): Multi-Platform
Software version: 3.5, 4.0, 5.0, 5.1, 6.0
Software edition: Advanced
Reference #: 1066524
IBM Group: Software Group
Modified date: 2002-10-17