Friday 7 December 2007

Logging

Log records information about events such as the startup and shutdown of servers, the deployment of new applications, or the failure of one or more subsystems. The log messages include information about the time and date of the event as well as the ID of the user who initiated the event. Each WebLogic Server instance can maintain a server log, an HTTP access log, a JDBC log and a JTA transaction log.

Tips

1. To prevent restarting a respective server if the log file grows too large, enable log rotation.

2. Consider rotating the log file by size, rather than by time in production, because, with the time in production option, the file can grow large very quickly.

3. If you are not debugging interactively and the WebLogic Server is started in the background (Windows or Unix), use these commands to redirect stdout and stderr messages to a file:

  • -Dweblogic.Stdout="stdout-filename"
  • -Dweblogic.Stderr="stderr-filename"
4. In production, you can avoid extra file I/O on the server if you do not enable WebLogic servers to create a JDBC log.

5. When using node managers to start managed servers, the node manager captures and stores the server's stdout to a file. The Administration Console can be used to view the contents of that file.

6. Audit the WebLogic Server log file frequently, to become familiar with normal operation, so that you can readily identify abnormal log entries.

1 comment:

Anonymous said...

What is the command line argument to rotate these logs?