Configuring WebSphere Portal Express for
site analysis logging
IBM® WebSphere® Portal Express implements
a logging function for your usage data.
Note: If you want to generate
reports for portlet actions, write a custom report.
Enable site analysis logging
Site analysis
logging is not enabled by default.
To configure WebSphere Portal Express for
site analysis logging, set the following parameters in the WP SiteAnalyzerLogService
as described in Set configuration properties.
- Set the parameters for the file names of the log files and backup
log files. To specify the file name format, follow these instructions and
use the tokens listed after the instructions:
- Search for the parameter SiteAnalyzerFileHandler.fileName .
Use this parameter to determine the location and filename of the log file.
The default value is log/sa.log .
- Search for the parameter SiteAnalyzerFileHandler.backupFileName .
Use this parameter to determine the location and filename of the backup file
for the log file. The default value is log/sa_$CREATE_TIME.log .
When the log file is backed up, the current data is stored in a
file named by the parameter SiteAnalyzerFileHandler.backupFileName you
specified (default log/sa_$CREATE_TIME.log )
and a new file is created for the new data with the name you specified by
the SiteAnalyzerFileHandler.fileName parameter
(default sa.log ).
When defining the
names for the log files and backup files, you can specify the three following
tokens as part of the directory location or file name:
- $APPSERVER_NAME
- The name of the application server. Use this token for vertical clusters
to enforce that the different application servers write into different files
if they share the same file system.
- $CREATE_TIME
- The date and time at which the file was created. The date format of this
token is specified by the SiteAnalyzerFileHandler.dateFormat parameter
as described below.
- $CLOSE_TIME
- The date and time at which the file was closed. The date format of this
token is specified by SiteAnalyzerFileHandler.dateFormat parameter
as described below. For a file that WebSphere Portal Express is
currently writing to, the value for $CLOSE_TIME is
the same as $CREATE_TIME.
An example with all three tokens: You can specify the
file location and name for a log file or backup file as follows: log/backup/$APPSERVER_NAME/sa_$CREATE_TIME_$CLOSE_TIME.log .
The format for the $CREATE_TIME and $CLOSE_TIME tokens
is defined by the value set for the SiteAnalyzerFileHandler.dateFormat parameter
as described in the next step below.
- Set the parameter for the date format tokens in the log file names.
To do this, search for the parameter SiteAnalyzerFileHandler.dateFormat .
Use this parameter to set the date and time formats in the $CREATE_TIME and $CLOSE_TIME tokens
that are part of the log file names. The value you specify determines the
format of the date and time that replace the token in the names of the base
and backup log files. Example of date and time format: SiteAnalyzerFileHandler.dateFormat=yyyy.MM.dd-HH.mm.ss .
- To control the interval at which the log file is backed up, uncomment
only one of the following parameters and set the time interval for it:
- If you want to log in intervals of minutes, uncomment SiteAnalyzerFileHandler.minutesPerLogFile and
set the value to an integer in the range 1 to 60.
- If you want to log in intervals of hours, uncomment SiteAnalyzerFileHandler.hoursPerLogFile and
set the value to an integer in the range 1 to 24.
- If you want to log in intervals of days, uncomment SiteAnalyzerFileHandler.daysPerLogFile and
set the value to an integer that indicates the number of days.
Notes:
- If you enable more than one date format interval, the smallest
interval will be used.
- The difference between 60 minutes and 1 hour is as follows:
If you specify 60 minutes the file is backed up after 60 minutes, but if you
specify 1 hour, the file is backed up on the next full hour interval, such
as 01:00, 02:00 and so on. For day intervals, the file is backed up only at
24:00 (midnight). If you need more information about the date format, see
the Javadoc for java.text.SimpleDateFormat.
The flexibility of the date format makes it easy to coordinate
scheduling the file backup. For example, you can configure WebSphere Portal Express to
backup the site analysis log every hour.
- Activate selected loggers:
- To activate logging for certain loggers, uncomment the loggers that you
want to use and set them to true. See the following
table for a description of each logger.
WebSphere Portal Express Server
Analysis Logger
| Description and Activity Logged
|
SiteAnalyzerSessionLogger.isLogging
| HTTP requests that include the URLs: /Command/Login /Command/Logout
|
SiteAnalyzerUserManagementLogger.isLogging
| HTTP requests that include the URLs: /Command/UserManagement/CreateUser /Command/UserManagement/DeleteUser /Command/UserManagement/CreateGroup /Command/UserManagement/DeleteGroup
|
SiteAnalyzerPageLogger.isLogging
| HTTP requests that include the URLs: /Page/* /Command/Customizer/CreatePage /Command/Customizer/EditPage /Command/Customizer/DeletePage
|
SiteAnalyzerPortletLogger.isLogging
| HTTP requests that include the URLs: /Portlet/*
|
SiteAnalyzerPortletActionLogger.isLogging
| HTTP requests that include the URLs: /PortletAction/*
|
SiteAnalyzerErrorLogger.isLogging
| HTTP requests that include the URLs: /Error/Portlet /Error/Page The referrer field points to a portlet name or a page name.
Examples of such referrer fields are: http://your.server.name/Portlet/1/PortletName http://your.server.name/Page/1/PageName
|
SiteAnalyzerApplicationActionLogger.isLogging=true
| HTTP requests that include the URLs: /ApplicationAction/*
|
- Restart the WebSphere Portal Express application
server to commit the changes.
Disable site analysis logging
Site analysis
logging can have performance impacts so you might want to disable it when
not in use. By default site analysis logging is not enabled. To disable site
analysis logging, search for the desired parameter(s) as listed in the table
above and set them to false.
Related
information
Parent topic: Logging and tracing
|
|
|