+

Search Tips   |   Advanced Search

Enable site analysis logging

Site analysis logging is not enabled by default. To enable site analysis logging, set the following service configuration properties in WP SiteAnalyzerLogService.

  1. Names for the log files and backup log files.

      SiteAnalyzerFileHandler.fileName

      Location and file name of the log file. The default value is...

        logs/$APPSERVER_NAME/sa.log

      SiteAnalyzerFileHandler.backupFileName

      Location and file name of the backup file for the log file. The default value is...

        logs/$APPSERVER_NAME/sa_$CREATE_TIME.log

      When the log file is backed up, the current data is stored in the backup file, sa_$CREATE_TIME.log, and a new log file, sa.log, is created.

    We can specify the following tokens as part of the directory location or file name:

      $APPSERVER_NAME

      Name of the application server. Use this token for vertical clusters to enforce the different application servers write into different files if they share file system.

      $CREATE_TIME

      Date and time the file is created. Specify the format of this token in this parameter:

        SiteAnalyzerFileHandler.dateFormat

      $CLOSE_TIME

      Date and time the file is closed. Specify the format of this token in this parameter:

        SiteAnalyzerFileHandler.dateFormat

    For example, we can specify log file locations and names as follows:

      log/backup/$APPSERVER_NAME/sa_$CREATE_TIME_$CLOSE_TIME.log

    If WebSphere Portal is writing to a file, the values for $CLOSE_TIME and $CREATE_TIME are the same.

  2. Specify the date format for tokens in the log file names.

      SiteAnalyzerFileHandler.dateFormat

      Set a value to format the date and time for the $CLOSE_TIME and $CREATE_TIME tokens. For example...

        SiteAnalyzerFileHandler.dateFormat=yyyy.MM.dd-HH.mm.ss

  3. Specify the interval to back up log files.

      SiteAnalyzerFileHandler.minutesPerLogFile

      Sets the backup interval in minutes. Set a value between 1 and 60.

      SiteAnalyzerFileHandler.hoursPerLogFile

      Sets the backup interval in hours. Set a value between 1 and 24.

      SiteAnalyzerFileHandler.daysPerLogFile

      Sets the backup interval in days. Set any value that indicates the number of days between backups.

    If we enable more than one date format interval, the smallest interval is used. If we specify 60 minutes, the file is backed up after 60 minutes. If we specify 1 hour, the file is backed up on the next full hour; for example, 01:00, 02:00 and so on. If we specify an interval of days, the file is backed up at 24:00 (midnight). For more information about the format, see the Javadoc for java.text.SimpleDateFormat.

  4. Activate loggers as appropriate

    To activate a logger, select the logger to activate and set the value to true. For example...

    Site analysis logging can affect performance. Disable loggers when necessary.

  5. Restart WebSphere Portal.


Parent Log and analyze server side site data

Related tasks:

Set service configuration properties