| Previous | Next |  | Contents | Index | Glossary

## Log

PL/SQL Syntax

`function Log`

        (p_subscription_guid in raw,

         p_event in out wf_event_t) return varchar2;

Description

Logs the contents of the specified event message using DBMS_OUTPUT.put_line and returns the status code SUCCESS. Use this function to output the contents of an event message to a SQL*Plus session for testing and debugging purposes.

For example, if you want to test a custom rule function that modifies the event message, you can use Log() to show the event message both before and after your custom rule function is run. Define three subscriptions to the relevant event as follows:

- Define the first subscription with a phase of 10 and the rule function WF_RULE.Log.

- Define the second subscription with a phase of 20 and your custom rule function.

- Define the third subscription with a phase of 30 and the rule function WF_RULE.Log.

Next, connect to SQL*Plus. Execute the following command:

    	set serveroutput on size 100000

Then raise the event using WF_EVENT.Raise. As the Event Manager executes your subscriptions to the event in phase order, you should see the contents of the event message both before and after your custom rule function is run.

> Note: You should not assign Log() as the rule function for any enabled subscriptions in a production instance of Oracle Workflow. This function should be used for debugging only.

Arguments (input) | p_subscription_ guidThe globally unique identifier of the subscription.
p_event | The event message.

| Previous | Next |  | Contents | Index | Glossary