Wednesday, May 11, 2011

System event logging: WebSphere Portal 7

The system event logging facility of IBM® WebSphere® Portal enables the recording of information about the operation of WebSphere Portal.

Event logs provide administrators with information on important or abnormal events, especially errors that occur during the operation of the product. In addition, event logs gather debugging information that helps IBM support to resolve problems.

WebSphere Portal provides two types of logging: logging of messages and logging of debugging messages called traces.

For information about how to use log files and a list of trace logger strings refer to the topic about WebSphere Portal logs.

This topic has the following sections:

Message logging
WebSphere Portal provides the logging of messages that report errors and status information.

The following types of messages are provided:


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


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.


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

Messages for WebSphere Portal are logged in the following files:


Contains information that is useful for monitor the health of the WebSphere Portal server and all running processes.


Contains exception stack trace information that is useful when performing problem analysis.

Locating the log files: Log files for WebSphere Portal, including SystemOut.log and System.err are located in the following directory: wp_profile_root/logs/WebSphere_Portal

Trace logging

WebSphere Portal provides the logging of debugging messages called traces. These traces are useful for fixing problems. However, to save system resources, they are switched off by default.

Traces can be set for different durations:


Traces can be set for a temporary period by using the administration portlet Enable Tracing or the IBM WebSphere Application Server administrative console. To set traces by using the portlet, proceed by the following steps:
Log in as the administrator.
Click Administration -> Portal Analysis -> Enable Tracing. The Enable Tracing portlet appears.
Type the required trace string into the field Append these trace settings:. For example, this can be*=finest
Click the Add icon. Enable Tracing updates the field Current trace settings:
Note: 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*=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.


To enable trace settings for a longer period of time, that is, for more than one session, switch them on in the WebSphere Application Server configuration. Proceed by the following steps:
Access the WebSphere Application Server Administrative Console by using this URL: http://hostname:port_number/ibm/console
Click Servers -> Server Types -> WebSphere application servers.
Select the application server.
Click Troubleshooting -> Change Log Detail Levels.
Specify the required trace settings. For example, this can be*=finest
Save your updates.
Restart WebSphere Portal.
To disable tracing, specify tracestring: *=info and restart WebSphere Portal.

Changing the log file name and location
You can change the locations of the log files by configuring them in the WebSphere Application Server administrative console. Select Troubleshooting -> Logs and Trace -> server_name and select the logger type that you want to change. In the configuration dialog change the path for the log file as required. For a description of the available types of log files refer to the WebSphere Application Server information center.

Changing 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 the file This file is located in the following WebSphere Portal directory:

UNIX: wp_profile_root/PortalServer/config/config
i: wp_profile_root/PortalServer/config/config
Windows: wp_profile_root\\PortalServer\\config\\config

Add the following line:


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:


Reference: Log file format

If the logs are written to the log file of WebSphere Portal and not redirected to the logging facility WebSphere Application Server, 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


timestamp is the time (to the millisecond) when the log record was created.
classification is one of the following letters:
E for error messages
W for warning messages
I for informational messages
l for traces (low details)
m for traces (medium details)
h for traces (high details)
classname is the Java class containing the code that triggered the log event.
method is the name of the Java method containing the code that triggered the log event.
messagecode is a unique identifier for this message, to uniquely identify the specific message and refer to it when consulting documentation or support. The message code is only available for error, warning, or informational messages, and not for traces. It consists of:
a four-character identifier for the component that defines the message.
a four-digit number identifying the message in the component.
a one-letter classification code, which can be E, W or I , as defined above.
logmessage is the actual log message describing the logged event. Error, warning, and informational messages are translated into the system locale. Trace messages are not translated.
threadID is the identification of the thread that triggered the log event.


Traces are written only if the specific tracing facility is enabled; all other messages are written unconditionally.
The system locale is part of the general internationalization features of WebSphere Portal and can be configured via LocalizerService. For more information refer to the topics about Setting service configuration properties and about the Portal configuration services.

The following is an example of a log record:

2003.05.16 13:36:14.449 W init 0000003a

DSTO0063W: The transaction isolation level is not set to READ_COMMITTED.


Tuesday, May 10, 2011

Portal Add a New Language

If the date does not display correctly in Portal the locale might not be fully supported by Portal. To rectify this add the Language en_ZA. You access the XML configuration interface using a command line tool. This command line client is a small separate program that connects to the server using an HTTP connection or a secure HTTPS connection with SSL. It is therefore possible to configure the portal remotely.

Full syntax: /WebSphere/PortalServer/bin/ -url localhost:10038/wps/config -in CreatLanguage.xml -out /tmp/result.xml

Should run with: ./ -in /tmp/CreateLanguage.xml
respond to user/passwd prompts
must have admin rights to import the new lang.

Here is the CreateLanguage.xml file to add the lang/locale en_ZA:

English - South Africa