Administration Console Online Help

    Previous Next  Open TOC in new window 
Content starts here

Enable and configure HTTP logs

By default, the HTTP subsystem keeps a log of all HTTP transactions in a text file. The default location and rotation policy for HTTP access logs is the same as the server log, in the logs directory below the server instance root directory. See Change server log file name and location.

You can set the attributes that define the behavior of HTTP access logs for each server or for each virtual host that you define. See Configure HTTP log file settings for a virtual host.

  1. If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit (see Use the Change Center).
  2. In the left pane of the Console, expand Environment and select Servers.
  3. In the Servers table, click the name of the server instance whose HTTP logging you want to configure.
  4. Select Logging > HTTP.
  5. On the Logging: HTTP page:
    1. Select the HTTP Access Log File Enabled check box, if it is not already selected.

      For more information about the values to enter in the fields on this page, see Configuration Options.

    2. In the Log File Name field, enter a path and filename for the HTTP access log.

      Enter an absolute pathname or a pathname that is relative to the server's root directory. If you use the Node Manager to start a Managed Server, the root directory is located on the computer that hosts the Node Manager process. For more information, see A Server's Root Directory.

    3. To include a time and date stamp in the file name when the log file is rotated, in the Log File Name field, add java.text.SimpleDateFormat variables to the file name and surround each variable with percentage (%) characters.

      For example, if you enter the following value in the Log File Name field: access_%yyyy%_%MM%_%dd%_%hh%_%mm%.log, the virtual host's HTTP log file will be named: access_yyyy_MM_dd_hh_mm.log. When the server instance rotates the HTTP log file, the rotated file name contains the date stamp. For example, if the server instance rotates the log file on 2 Jan, 2005 at 10:05 AM, the log file that contains the old log messages will be named: access_2005_01_02_10_05.log. If you do not include a time and date stamp, the rotated log files are numbered in order of creation filenamennnnn, where filename is the name configured for the log file. For example, access.log00007.

  6. By default, the server moves old HTTP requests to another file when the current HTTP log file grows beyond 5000 kilobytes when running a WebLogic Server instance in production mode, or 500 kilobytes when running a WebLogic Server instance in development mode. Also by default, the server can create an unlimited number of these archive log files. To change these defaults:
    1. In the Rotation File Size field, enter the file size that triggers the server to move HTTP requests to a separate file. After the HTTP log file reaches the specified size, the next time the server checks the file size, it will rename the current log file. After the server renames a file, subsequent messages accumulate in a new file named access.log.
    2. To limit the number of HTTP log files that the server creates to store old HTTP requests, select the Limit Number of Retained Files check box. Then in the Files to Retain field, enter the maximum number of log files. After the server reaches this limit, it deletes the oldest log file and creates a new log file with the latest suffix.
  7. To move old HTTP requests to another file at specific time intervals instead of when the log file reaches a specific size:
    1. In Rotation Type list box, choose By Time.
    2. In Begin Rotation Time field, enter the start time.

      Use the following java.text.SimpleDateFormat format to specify a date and time: MM-DD-yyyy-k:mm:ss. For information about this format, refer to the J2EE Javadoc.

      At the time that you specify, the server rotates the current log file. If the time that you specify is already past, the server starts its file rotation immediately. Thereafter, the server rotates the HTTP log file at an interval that you specify in Rotation Interval.

    3. In the Rotation Interval field, enter the interval at which the server saves old HTTP requests to another file.
  8. In the Log File Rotation Directory field, enter the directory location where the rotated log files will be stored.

    Enter an absolute pathname or a pathname that is relative to the server's root directory. By default, the rotated files are stored in the same directory where the log file is stored.

  9. At the bottom of the page, click Advanced.
  10. In the Format list box, determine the format of the HTTP log file by selecting Common or Extended.
    1. The extended log format allows you to specify the type and order of information recorded about each HTTP communication. Use the Extended Logging Format Fields to specify the list of fields for access.log.

      For more information, see Setting Up HTTP Access Logs by Using Extended Log Format.

    2. Select Log Time in GMT to specify whether the time stamps for HTTP log messages are in Greenwich Mean Time (GMT) regardless of the local time zone that the host computer specifies. This method applies only if you have specified the extended log format.
  11. Click Save.
  12. To activate these changes, in the Change Center of the Administration Console, click Activate Changes.
    Not all changes take effect immediately—some require a restart (see Use the Change Center).

After you finish

Restart the server.

  Back to Top