| Oracle Application Server Portal PL/SQL API Reference - 904 | |||||||
| 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 perform administrative functions on event logs.
For more information, see
- Events, event logging,
and event properties
- Using the event logging
service
- Event log record
- Secured logging views
| Exception Summary | |
LOG_EVENT_NOT_FOUND | |
LOG_FILTER_NOT_FOUND | |
NOT_ENOUGH_PRIVILEGES | |
UNABLE_TO_PURGE_LOG | |
| Variable Summary | |
g_has_registry_changed | boolean |
| Function/Procedure Summary | |
add_log_event | number |
add_log_registry | number |
get_log_info | |
get_log_interval | number |
purge_log | |
remove_log_event | |
remove_log_registry | |
remove_log_registry | |
set_log_interval | |
| Exception Detail |
LOG_EVENT_NOT_FOUND exception
LOG_FILTER_NOT_FOUND exception
NOT_ENOUGH_PRIVILEGES exception
UNABLE_TO_PURGE_LOG exception
| Variable Detail |
g_has_registry_changed boolean := null
| Function/Procedure Detail |
function add_log_event(
p_domain in varchar2,
p_subdomain in varchar2,
p_action in varchar2
) return numberUsers must have at least the Any Log Edit privilege to add a log event.
Note: These values are used to provide lists of values for users populating the wwlog_registry$ table via the Oracle Portal UI, i.e. functions available under Log Registry Administration in the Services portlet (Administer tab in Oracle Portal).
Example:
p_id := wwlog_api_admin.add_log_event
(
p_domain => 'Research&Development',
p_subdomain => 'Expenses',
p_action => 'view'
);
p_domain - the name of the domain of the object for
which an event is being loggedp_subdomain - the name of the subdomain of the object
for which an event is being loggedp_action - the name of the action being logged
function add_log_registry(
p_domain in varchar2,
p_subdomain in varchar2 default '%',
p_name in varchar2 default '%',
p_userid in varchar2 default '%',
p_action in varchar2 default '%',
p_http_user_agent in varchar2 default '%',
p_language in varchar2 default '%'
) return numberCall this function to add a record to the wwlog_registry$ table. The wwlog_registry$ table controls which logging calls are saved to the database.
Each time a call is made to a wwlog_api.log procedure, the new log record's values are compared to the records in the wwlog_registry$ table. If the comparison returns at least one record from the registry table, then a new log record is added to the database activity log.
Note: You can also add a record to the wwlog_registry$ table by clicking Log Registry Administration in the Services portlet (Administer tab in Oracle Portal).
Example:
p_id := wwlog_api_admin.add_log_registry
(
p_domain => 'Research&Development',
p_subdomain => 'Expenses',
p_name => '%',
p_action => 'view',
p_userid => '%',
p_http_user_agent => '%',
p_language => '%'
);
p_domain - the domain name for the object being loggedp_subdomain - the subdomain name of the object being loggedp_name - the name of the object being loggedp_userid - the user ID of user executing the actionp_action - the name of the action being loggedp_http_user_agent - the type of the browser being usedp_language - the language associated with logged event
procedure get_log_info(
p_current_log in out number,
p_new_log out number
) Call this procedure to determine which of the two Oracle Portal
log tables is being used:
- A value of 1 represents wwlog_activity_log1$.
- A value of 2 represents wwlog_activity_log2$.
The two values returned are passed into two number variables passed as parameters. If the two values are not the same, then the log indicated by p_new_log must be purged before a new log record is written to it.
Example:
wwlog_api_admin.get_log_info
(
p_current_log => l_current_log,
p_new_log => l_new_log
);
p_current_log - returns a value that indicates the transaction
log that is currently being written top_new_log - returns a value that indicates the transaction
log that should be used nextfunction get_log_interval return number
Note: Log purges may not occur at the exact interval returned, but they will not occur more frequently than the interval returned.
Example:
interval := wwlog_api_admin.get_log_interval;
procedure purge_log(
p_current_log in number
) This function removes ALL log records from the specified table. A user must have at least the ANY LOG EDIT privilege to call this procedure.
Example:
wwlog_api_admin.purge_log
(
p_current_log => 1
);
p_current_log - indicates which log will be purged
Pass '1' to purge all log records
in wwlog_activity_log1$
Pass '2' to purge all log records
in wwlog_activity_log2$NOT_ENOUGH_PRIVILEGES - if user has insufficient privileges,
i.e ADMIN.PurgeLog privileges
procedure remove_log_event(
p_domain in varchar2,
p_subdomain in varchar2,
p_action in varchar2
) Users must have at least the Any Log Edit privilege to remove a log event.
Example:
wwlog_api_admin.remove_log_event
(
p_domain => 'Research&Development',
p_subdomain => 'Expenses',
p_action => 'view'
);
p_domain - the name of the domain that contains record
to be removedp_subdomain - the name of the subdomain of the record to
be removedp_action - the name of the action performedLOG_EVENT_NOT_FOUND - if no matching log event record is found
procedure remove_log_registry(
p_id in number
) Example:
wwlog_api_admin.remove_log_registry
(
p_id => 3
);
p_id - the ID of the log filter record to be removedLOG_FILTER_NOT_FOUND - if no matching log filter record
is found
procedure remove_log_registry(
p_domain in varchar2,
p_subdomain in varchar2 default '%',
p_name in varchar2 default '%',
p_userid in varchar2 default '%',
p_action in varchar2 default '%',
p_http_user_agent in varchar2 default '%',
p_language in varchar2 default '%'
) Example:
wwlog_api_admin.remove_log_registry
(
p_domain => 'Research&Development',
p_subdomain => 'Expenses',
p_name => '%',
p_action => 'view',
p_userid => '%',
p_http_user_agent => '%',
p_language => '%'
);
p_domain - the domain name for object being loggedp_subdomain - the subdomain name for object being loggedp_name - the name of object being loggedp_userid - the user ID for user executing the actionp_action - the name of the action being loggedp_http_user_agent - the type for the browser being usedp_language - the language associated with logged event
procedure set_log_interval(
p_interval in integer
) Call this procedure to set the event log purge interval in days. Users must have at least the Any Log - Edit privilege to set a log interval.
Note: If the last log switch happened on 01-JAN-2000, and if the set interval = 21, then the first time that a log call is made when 01-JAN-2000 + 21 (22-JAN-2000) is earlier than the current date, the new destination log is purged and the log switch is performed.
Example:
wwlog_api_admin.set_log_interval
(
p_interval => 21
);
p_interval - the number of days between event log purgesNOT_ENOUGH_PRIVILEGES - if a user attempting to use this
procedure has insufficient privileges
| Oracle Application Server Portal PL/SQL API Reference - 904 | |||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||
| SUMMARY: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | DETAIL: EXCEPTION | TYPE | CONSTANT | VARIABLE | FUNCTION/PROCEDURE | |||||||