System event logging

 

+

Search Tips   |   Advanced Search

 

WebSphere Portal provides two types of logging:

 

Message logging

Messages that report errors and status information. Types include:

Informational

A condition worth noting but does not require the user to perform an action.

Warning

An abnormal condition has been detected. The user may have to take action.

However, WebSphere Portal code is able to handle the condition without failing.

Error

A serious failure in the execution of the application that requires further action.

 

Trace logging

Switched off by default. Can be set for different durations...

Temporary

Traces can be set for a temporary period by using the administration portlet Enable Tracing or the IBM WAS administrative console. To set traces by using the portlet...

  1. Log in as the administrator.

  2. Click...

    Administration | Portal Analysis | Enable Tracing

    The Enable Tracing portlet appears.

  3. Type the required trace string into the field Append these trace settings:. For example, this can be...

    com.ibm.wps.command.credentialvault.*=finest

  4. Click the Add icon. Enable Tracing updates the field Current trace settings:

Restarting WebSphere Portal will remove traces that were set by using the Enable Tracing Administration portlet. To disable tracing, do either of the following:

  • Select the current trace settings under Current trace settings: and click the Remove icon. By the example given above, the current setting can be com.ibm.wps.command.credentialvault.*=finest.

  • Type the trace string *=info into the field Append these trace settings: and click the Add icon. This trace string overwrites all settings listed under Current trace settings: and resets it to the default.

Extended

To enable trace settings for a longer period of time, that is, for more than one session, switch them on in the WAS configuration.

  1. Access the WAS Administrative Console

  2. Go to...

    Server | Application servers | servername | Troubleshooting | Change Log Detail Levels

  3. Specify the required trace settings. For example, this can be...

    com.ibm.wps.command.credentialvault.*=finest

  4. Save your updates.

  5. Restart WebSphere Portal.

  6. To disable tracing, specify tracestring: *=info and restart WebSphere Portal.

 

Use separate log files

WebSphere Portal supports the redirection of its trace and message logging into separate log files. This can help you separate the log output of components from the output of other applications and WAS itself. The redirection is disabled by default. If you enable it, WebSphere Portal creates its own log file. It writes all trace and message logs to this new log file and no longer to the log files of WAS.

You enable the redirection into separate log files by setting the log configuration key useAppServerLog to false in...

 

Change the log file name and location

When you configure WebSphere Portal to write its trace and message logging to a separate log file, a new file is created...

This file is updated when an error occurs or if trace logs are created.

You can change the location and the name of this file by setting the configuration key logFileName in

The specified log file name can contain one of two tokens that are automatically replaced with the corresponding values when starting WebSphere Portal:

You can specify the location of the log file either using a relative path or an absolute path.

If you change the location of the log file, restart WebSphere Portal in order to use the new location.

 

Change the language used in the log file

By default, information in the log file is written in the language that was used for the WebSphere Portal installation. However, because WebSphere Portal supports a number of languages, you can choose to have the log file information written in a language other than that used during installation.

To change the language used for the log file, edit

...and add the following line...

locale=xx
where xxis the two-letter abbreviation for the locale.

For a list of the locale abbreviations used with WebSphere Portal, refer to Directories for languages. For example, to have log information generated in English you would add the following line:

locale=en

 

Reference: Log file format

If the logs are written to the log file of WebSphere Portal and not redirected to the logging facility WAS, the log file consists of a sequence log records that are separated by blank lines.

The log records have the following format:

      timestamp classification classname method threadID
     messagecode: logmessage
Where:

  1. Traces are written only if the specific tracing facility is enabled; all other messages are written unconditionally.

  2. The system locale is part of the general internationalization features of WebSphere Portal and can be configured via LocalizerService. For more information refer to Configure portal behavior.

The following is an example of a log record:

2003.05.16 13:36:14.449 W com.ibm.wps.services.datastore.DataStoreServiceImpl init 0000003a DSTO0063W: The transaction isolation level is not set to READ_COMMITTED.

The current value is TRANSACTION_REPEATABLE_READ.

 

Parent topic

Logging and tracing