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 .
If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit (see Use the Change Center).
In the left pane
of the Console, expand Environment and select
In the Servers table, click the name of
the server instance whose HTTP logging you want to configure.
Select Logging > HTTP.
On the Logging: HTTP page:
Select the HTTP Access Log File
Enabled check box, if it is not already
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.
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
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.
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:
In the Maximum 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.
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.
To move old HTTP requests to another file at specific time
intervals instead of when the log file reaches a specific size:
In Rotation Type list box, choose
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.
In the Rotation Interval field, enter
the interval at which the server saves old HTTP requests to
In the Log File Rotation Directory field,
enter the directory location where the rotated log files will be
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.
At the bottom of the page, click
In the Format list box, determine the
format of the HTTP log file by selecting Common
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.
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.
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).