Oracle9iAS Portal Developer Kit

Events, event logging, and event properties

The combination of logging and monitoring events in wwlog_api and wwlog_api_admin API packages enables an end-user with appropriate privileges to analyze events that have occurred in their Oracle Portal installation.

This topic presents the following subjects:

What are events?

Events are Oracle Portal processes, or actions that can be performed on database objects. Descriptive information about an event can be captured, and both this and discretionary information can be stored in Oracle Portal logging tables.

If the elapsed time of an event is automatically determined by an event handling API, it is automatically logged. Events can be logged with starting and stopping calls, they can also be logged with a single call. In this case, the caller of the API must calculate the elapsed time.

Sample loggable objects and actions

Pages

Create, Edit, View, Delete

Category

View

Perspective

View

Items

Create, Edit, Move, View, Delete, Checkout, Checkin

Documents

Create, View, Delete

Components

Create, Edit, Execute, Delete

Users

Create, Edit, Delete, Login, Logout, Add to group, Delete from group

Groups

Create user, Create group, Delete user, Add to group, Delete from group, Delete group

Search

Search

Portlet

Added to page, Deleted from page, Hide, Show, Customize

Characteristics of events and event logging

Before working with event logging methods, you should be familiar with this information:

  • Events are tagged with the name of the Oracle Portal domain in which they occurred.

  • One method can start an event and another can end it.
  • The interval between log entry purges can be defined in days by users with appropriate security privileges.
  • Every log entry has an ID, which is a unique identifier.
  • The logging information is accessible through provider-written SQL calls.
  • String values that relate to other information in the record or to information stored elsewhere can be stored in designated fields in the event logs.

Creating log records

Providers determine which events are logged into the Oracle Portal logging tables. A logging call for an event follows this sequence:

  1. The logging table is checked for a match between the parameters specified in the event logging call and existing registry records.

  2. If the call parameters match the parameters of an existing record, the event called to be logged is an event that should be logged, and the log record is added to the table.

  3. If a match is not found, nothing is recorded.

Example: If the only record in the wwlog_registry$ table contains these event property names and values,

Event property

Value

domain

Research&Development

sub_domain

Expenses

name

%

userid

%

action

VIEW

http_user_agent

%

language

%

then only logging requests for the Research&Development domain, Expenses sub-domain, and the VIEW action for any folder in the domain, by any user, and with any browser in any language, are recorded in the logging tables.

Notes:

  • The % symbol is used for wild card matching with any value that appears in a specified column in the wwlog_registry$ logging table.

  • If the only record in the table has a % in every column, then all log requests create records in the logging tables.
  • If there are no records in the table, then no log records are recorded.

Key columns

The key columns in the wwlog_registry table are provided for recording identifying values that help to relate the logging record to other data.

Example: When logging events about a folder in a content area, key_1 could hold the Content Area ID and key_2 could hold the folder ID.

Notes:

  • Use of any key column is optional.

  • The values in the key columns vary according to the requirements of the sub-systems that are recording log records.

In Oracle Portal, the logging methods can be called from PL/SQL packages only. The PL/SQL implementation of the Logging API is installed in the wwlog_api and wwlog_api_admin packages.

Event properties

Events have the properties shown in the following table. Some of these properties must be supplied by the caller of the API, and others are automatically gathered by the API itself. Event properties exactly correspond to the record fields in the logging tables.

Note

Event properties are loggable aspects of an event. Event property names correspond to field names in the logging table.

Related topics

The PL/SQL API Reference is part of the Portal Developer Kit on Portal Studio