| Oracle Application Server Portal PL/SQL API Reference - 10.1.4 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||
This package contains methods to log events.
For more information, see
- Events, event logging,
and event properties
- Using the event logging
service
- Event log record
- Secured logging views
| Exception Summary | |
CANNOT_CREATE_LOG | |
CANNOT_INSERT_LOG | |
CANNOT_UPDATE_LOG | |
UNABLE_TO_PURGE_LOG | |
| Type Summary | |
g_log_registry_array | table |
g_log_registry_record | subtype |
| Function/Procedure Summary | |
get_log_registry | g_log_registry_array |
log | |
start_log | integer |
stop_log | |
update_log_information | |
| Exception Detail |
CANNOT_CREATE_LOG exception
CANNOT_INSERT_LOG exception
CANNOT_UPDATE_LOG exception
UNABLE_TO_PURGE_LOG exception
| Type Detail |
type g_log_registry_array is table of g_log_registry_record index by binary_integer
subtype g_log_registry_record is wwlog_registry$%rowtype
| Constant Detail |
ACTION_ADD_TO_GROUP constant varchar2(20) := 'add_to_group'
ACTION_ADD_TO_PAGE constant varchar2(20) := 'add_to_page'
ACTION_CHECKIN constant varchar2(20) := 'checkin'
ACTION_CHECKOUT constant varchar2(20) := 'checkout'
ACTION_CREATE constant varchar2(20) := 'create'
ACTION_CUSTOMIZE constant varchar2(20) := 'customize'
ACTION_DEBUG constant varchar2(20) := 'debug'
ACTION_DELETE constant varchar2(20) := 'delete'
ACTION_DELETE_FROM_GROUP constant varchar2(20) := 'delete_from_group'
ACTION_DELETE_FROM_PAGE constant varchar2(20) := 'delete_from_page'
ACTION_EDIT constant varchar2(20) := 'edit'
ACTION_ERROR constant varchar2(20) := 'error'
ACTION_GATHER constant varchar2(20) := 'gather'
ACTION_GET_PORTLET constant varchar2(20) := 'get_portlet'
ACTION_HIDE constant varchar2(20) := 'hide'
ACTION_LOGIN constant varchar2(20) := 'login'
ACTION_LOGOUT constant varchar2(20) := 'logout'
ACTION_MOVE constant varchar2(20) := 'move'
ACTION_PORTLET constant varchar2(20) := 'portlet'
ACTION_PROVIDER constant varchar2(20) := 'provider'
ACTION_SEARCH constant varchar2(20) := 'search'
ACTION_SHOW constant varchar2(20) := 'show'
ACTION_VIEW constant varchar2(20) := 'view'
DOMAIN_WWC constant varchar2(12) := 'wwc'
DOMAIN_WWF constant varchar2(12) := 'wwf'
DOMAIN_WWS constant varchar2(12) := 'wws'
DOMAIN_WWV constant varchar2(12) := 'wwv'
SUBDOMAIN_CATEGORY constant varchar2(12) := 'category'
SUBDOMAIN_DOCUMENT constant varchar2(12) := 'document'
SUBDOMAIN_FOLDER constant varchar2(12) := 'folder'
SUBDOMAIN_GROUP constant varchar2(12) := 'group'
SUBDOMAIN_ITEM constant varchar2(12) := 'item'
SUBDOMAIN_MOBILE constant varchar2(12) := 'mobile'
SUBDOMAIN_PAGE constant varchar2(12) := 'page'
SUBDOMAIN_PERSPECTIVE constant varchar2(12) := 'perspective'
SUBDOMAIN_PORTLET constant varchar2(12) := 'portlet'
SUBDOMAIN_PROVIDER constant varchar2(12) := 'provider'
SUBDOMAIN_SEARCH constant varchar2(12) := 'search'
SUBDOMAIN_STATISTICS constant varchar2(12) := 'statistics'
SUBDOMAIN_USER constant varchar2(12) := 'user'
| Function/Procedure Detail |
function get_log_registry return g_log_registry_array
Call this function to retrieve an array containing all existing log registry records.
Note: The log registry table is useful for determining those logging calls that are actually recorded in the activity log.
Example:
g_log_registry_array := wwlog_api.get_log_registry;
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,
p_autonomous in boolean default false
) Call this procedure to insert an event record with specified values into the log table. Any user can use the log procedure.
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.
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
);
p_domain - the domain of the object being loggedp_subdomain - the subdomain of the object being loggedp_name - the name of the object against which the
event is logged.
Note that a name can be, but is not
required to be, a non-translatable string
value.p_action - the action being performed on the object.
A value for this string must be provided.
Note that an action can be, but is not
required to be, a non-translatable string
value.p_information - a comment string that can be included
in the logging record.p_url - a URL string used to redirect the browser
back to the object that was loggedp_row_count - the number of rows operated on, or retrievedp_elapsed_time - the time, in seconds, between the start_log
call and the stop_log callp_key_1 - a discretionary value for key_1p_key_2 - a discretionary value for key_2p_key_3 - a discretionary value for key_3p_key_4 - a discretionary value for key_4p_key_5 - a discretionary value for key_5UNABLE_TO_PURGE_LOG - if the log cannot be purgedCANNOT_CREATE_LOG - if a temporary log record cannot be
createdCANNOT_INSERT_LOG - if a log record cannot be inserted
into a database
function start_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_deferred in boolean default true,
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
) return integerCall this function to initialize a log entry and return its record ID. Any user can use this function.
Note: The elapsed time for an action being logged is the difference (to 1/100 of a second) between the time that this method is called and the time that wwlog_api.stop_log is called.
Example:
l_logid := wwlog_api.start_log
(
p_domain => Research&Development,
p_subdomain => 'Expenses',
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_deferred => true,
p_key_1 => '1',
p_key_2 => '7334',
p_key_3 => null,
p_key_4 => null,
p_key_5 => null
);
p_domain - the domain of the object being loggedp_subdomain - the subdomain of the object being loggedp_name - the name of the instance of the object against
which the event is logged. Note that a name
can be, but is not required to be, a
non-translatable string value.p_action - the name of the action being performed on the
object. A value for this string must be provided.
Note that this parameter is a non-translatable
string value.p_information - a comment string that can be included in the
logging recordp_url - a URL string used to redirect the browser back
to the object that was loggedp_deferred - indicates whether the database record
should be created by the start_log, or the
stop_log call.
Set p_deferred to TRUE if you want the logging
action to insert a record into the log table
only when the wwlog_api.stop_log command is
called. To do this, wwlog_api.stop_log must
be called with the same p_deferred value.
Set p_deferred to FALSE when you want the
wwlog_api.start_log function to insert a
log record and wwlog_api.stop_log to update
the record with the elapsed time.p_key_1 - a discretionary value for key_1p_key_2 - a discretionary value for key_2p_key_3 - a discretionary value for key_3p_key_4 - a discretionary value for key_4p_key_5 - a discretionary value for key_5UNABLE_TO_PURGE_LOG - if the log cannot be purgedCANNOT_CREATE_LOG - if a temporary log record cannot be createdCANNOT_INSERT_LOG - if a log record cannot be inserted into
the database
procedure stop_log(
p_id in integer,
p_row_count in integer default 0,
p_deferred in boolean default true
) Call this procedure to end a logging event that was started by wwlog_api.start_log. Any user can use the stop_log procedure.
Notes:
- If the log was started with p_deferred set to TRUE
(in start_log), then the stop_log call creates a record in
the log table.
- If p_deferred was set to FALSE, then the record exists and is
updated with the elapsed time, i.e. from the time the start_log
function was called to the time the stop_log function is called.
Example:
wwlog_api.stop_log
(
p_id => l_logid,
p_row_count => 34,
p_deferred => true
);
p_id - a unique identifier for the logged eventp_row_count - the number of table rows acted upon, or retrieved
by the stop_log callUNABLE_TO_PURGE_LOG - if the log cannot be purgedCANNOT_UPDATE_LOG - if a temporary log record cannot be updatedCANNOT_INSERT_LOG - if a log record cannot be inserted
into database
procedure update_log_information(
p_id in integer,
p_information in varchar2
) Call this procedure to update the log table 'information' column for an event record saved in the database. Any user can use the update_log_information procedure.
Example:
wwlog_api.update_log_information
(
p_id => l_logid,
p_information => 'New data for information column'
);
p_id - passes the ID of the log entry to modifyp_information - passes the new value for the log
table information columnCANNOT_UPDATE_LOG - if the log cannot be updated
| Oracle Application Server Portal PL/SQL API Reference - 10.1.4 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||