Sun Java System Portal Server 7.2 Administration Guide

Chapter 8 Managing Portal Server Logging

This chapter describes how to obtain Sun JavaTM System Portal Server log information.

This chapter contains the following sections:

Understanding Portal Server Logging

Portal Server supports logging across all components. The logs and log configuration are uniform across portal components. Seven standard log levels range from severe to fine grain. The logs can be routed to different files or data sinks and can consist of a single file or multiple files; that is, one for each component.

Log levels can be set for each module and sub-module, and logs can be routed to separate files for each module and sub-module within each component.

Managing Portal Server Logging

You can set up and manage Portal Server logging using the following components:

You can manage portal logging from the portal management console.

ProcedureTo Manage the Log Viewer

  1. To Login to the Management Console.

  2. Select the Portals tab.

  3. Select a portal server under Portals.

  4. Click Logging, then Log Viewer from the submenu.

  5. From the Instance Name drop-down menu, select a portal instance.

    The Search Criteria and Search Results page for the log viewer is displayed.

  6. Enter the values for the Search Criteria, and click Search.

    The following search options are available:

    Log File Name

    File name that has the log content.

    Log Level

    Messages at the selected level or higher appear in the log. The available levels are SEVERE, WARNING, INFO, CONFIG, FINE, FINER, and FINEST. The default level is INFO, so the log will contain messages of INFO, WARNING, or SEVERE levels.

    To ensure that the messages you want to view appear in the log, first set the appropriate log levels on the Specific Logger Settings page.

    Timestamp

    Displays log messages of a certain time period.

    You can view 100 most recent log entries, or type a time period in the From and To text boxes.

    If you choose a Specific Range:

    • Both the From Date and To Date values are required

    • The From Date value cannot be later than the To Date value

    • The To Date value cannot be later than Today's Date

    • The From Time and To Time values are optional. If the From Time value is specified, then the To Time value has to be specified. For the Time value, the syntax must take the form hh:mm:ss.SSS. SSS stands for milliseconds. For example, 18:20:10.000

Equivalent psadmin Command

psadmin set-logger in Sun Java System Portal Server 7.2 Command-Line Reference

ProcedureTo Customize the Log Display

You can customize the Search Results page using the following steps:

  1. To Login to the Management Console.

  2. Select the Portals tab.

  3. Select a Portal Server under Portals.

  4. Click Logging, then select a portal server from the Instance Name drop-down menu.

  5. In the Log Viewer Results table, click the Timestamp column header to sort the messages.

  6. Click the details link to view a formatted log message in a new window.

ProcedureTo Manage Common Logger Settings

  1. To Login to the Management Console.

  2. Select the Portals tab.

  3. Select a Portal Server under Portals.

  4. Click Logging, then Common Logger settings from the submenu.

  5. From the Instance Name drop-down menu, select a portal instance.

  6. Modify the configuration attributes as necessary.

    The following options are available:

    General

    Log Level — You can choose what information to view in a log file by selecting a log level setting.

    The choices for Log level include:

    • Severe - errors visible to users

    • Warning - user warnings

    • Info - informative for users

    • Config - static setup information for developers

    • Fine - basic tracing information

    • Finer - detailed tracing information

    • Finest - complete tracing information

    • Off - can be used to turn off logging

    • All - indicates that all messages should be logged

    File Handler Properties
    • Limit — Specify the size of the log file in bytes. If the log file size exceeds this value, the log file will be rotated based on file count. The default value is 5 megabytes.

    • File Count — When the log reaches the specified size in bytes, create a new empty file with the generation number (%g in the File Pattern) incremented by 1. The default value is 2. To turn off log file rotation, set the value to 0.

    • Append — Specify whether the new message is to be appended to the existing file. Default is true.

    • Filter — To filter log records that are sent to destinations such as portal log or a destination specified by a custom log handler, you can plug in a custom log filter. The custom filter must implement the interface java.util.logging.Filter. Type the absolute class name of the filter in the field. Also put the filter class in the Application Server classpath so that the filter is installed during server startup.

    Other
    • Custom Handlers — To send logs to a destination other than portal log, you can plug in a custom log handler. The custom handler must extend the class java.util.logging.Handler (a JSR 047 compliant API). Type the absolute class name of the handler in the field. Also put the handler class in the Application Server classpath so that the handler is installed during server startup. You can specify more than one handler. Use comma to separate multiple names.

    • Use Web Container Log File — To disable portal logging administration and route all logs to the web container log file, chose Yes, other chose No. Default is No.

  7. Click Apply to the Selected Instance or Apply to All Instances to record the changes.

Equivalent psadmin Command

psadmin set-logger in Sun Java System Portal Server 7.2 Command-Line Reference

ProcedureTo Manage Specific Logger Settings

  1. To Login to the Management Console.

  2. Select the Portals tab.

  3. Select a Portal Server from Portals.

  4. Click Logging, then Specific Logger settings from the submenu.

  5. From the Instance Name drop-down menu, select a portal instance.

  6. Modify the configuration attributes as necessary.

    The following options are available:

    Logger Settings
    • Logger Name – Click the logger name to get the configuration details of the logger.

    • Log Level – You choose what information to view in the log file for the logger by selecting a log level setting or you can inherit the log level from the parent logger. For example, if the log level of debug.com.sun.portal is INFO and the log level of debug.com.sun.portal.desktop is Inherit Parent Logger Level, then its value will also be INFO.

    • Log File Merge Strategy – For a logger, you can choose whether you want the log messages in the same log file as parent (Log to Parent Log File) or the log should go to a separate file (Log to Separate Log File).

    • Parent Handler – For a logger, if the Log File Merge Strategy is set to Log to Separate Log File, you can choose whether you want the messages to be logged to both the separate log file as well as the parent log file (Inherit Parent Handlers) or log to separate file only (Do not Inherit Parent Handlers).

    • Parent Handler – For a logger, if the Log File Merge Strategy is set to Log to Separate Log File, you can choose whether you want the messages to be logged to both the separate log file as well as the parent log file (Inherit Parent Handlers) or log to separate file only (Do not Inherit Parent Handlers).

    • Stacktrace – For a logger, you can choose whether you want the stacktrace to be logged for all levels (Print Stack Trace for All Levels) or for only till WARNING log level (Print Stack Trace till Warning Level).


      Note –

      If Log File Merge Strategy value is Log to Parent Log File, Parent Handler and stacktrace values are ignored. If Log File Merge Strategy value is Log to Separate Log File, and if Parent Handler value is Inherit Parent Handlers, the Stacktrace value Print Stack Trace for All Levels is not valid.


  7. Click Apply to the Selected Instance or Apply to All Instances to record the changes.

Equivalent psadmin Command

psadmin set-logger in Sun Java System Portal Server 7.2 Command-Line Reference