Oracle9iAS Portal Developer Kit

log procedure

Contained in package wwlog_api.

Call this procedure to insert an event record with specified values into the log table.

The parameters p_domain, p_subdomain, and p_name are required. Use of the remaining parameters is optional.

Note: This procedure does not calculate elapsed time. To do this, use the methods wwlog_api.start_log and wwlog_api.stop_log.

procedure log

(

p_domain in varchar2,

p_subdomain in varchar2,

p_name in varchar2,

p_action in varchar2 default null,

p_information in varchar2 default null,

p_url in varchar2 default null,

p_row_count in integer default 0,

p_elapsed_time in number default 0,

p_key_1 in varchar2 default null,

p_key_2 in varchar2 default null,

p_key_3 in varchar2 default null,

p_key_4 in varchar2 default null,

p_key_5 in varchar2 default null

);

Any user can use the log procedure.

Version: Oracle Portal 3.0.6.6.5 or later

Parameters:

p_domain

The domain of the object being logged.

Datatype: in varchar2

p_subdomain

The subdomain of the object being logged.

Datatype: in varchar2

p_name

The name of the object against which the event is logged.

Note: A name can be, but is not required to be, a non-translatable string value.

Datatype: in varchar2

p_action

The action being performed on the object.

A value for this string must be provided.

Note: An action can be, but is not required to be, a non-translatable string value.

Datatype: in varchar2
Default: null

p_information

A comment string that can be included in the logging record.

Note: This is an optional parameter.

Datatype: in varchar2
Default: null

p_row_count

The number of rows operated on or retrieved.

Datatype: in integer
Default: 0

p_elapsed_time

The time, in seconds, between the start_log call and the stop_log call.

Datatype: in NUMBER
Default: 0

p_key_1

A discretionary value for key_1.

Datatype: in varchar2
Default: null

p_key_2

A discretionary value for key_2.

Datatype: in varchar2
Default: null

p_key_3

A discretionary value for key_3.

Datatype: in varchar2
Default: null

p_key_4

A discretionary value for key_4.

Datatype: in varchar2
Default: null

p_key_5

A discretionary value for key_5.

Datatype: in varchar2
Default: null

Exceptions:

  • If the log cannot be purged, an UNABLE_TO_PURGE_LOG_EXCEPTION is raised.
  • If a temporary log record cannot be created, a CANNOT_CREATE_LOG_EXCEPTION is raised.
  • If a log record cannot be inserted into a transaction database, a CANNOT_INSERT_LOG_EXCEPTION is raised.

Example:

 wwlog_api.log

(

p_domain => wwlog_api.Research&Development,

p_subdomain => 'Expense_items',

p_name => '/SE_region/Incidental/Week1',

p_action => 'view',

p_information => 'Week1 included Memorial Day picnic',

p_url => 'tools.rd_main.main?p_cornerid=772',

p_row_count => 34,

p_elapsed_time => .45

);

Related topics

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