1 PACKAGE pos_log AS
2 /*$Header: POSLOGS.pls 120.2 2006/02/20 11:42:37 bitang noship $ */
3
4 -- This procedure logs the return status, msg count and msg data.
5 -- p_prefix will be used as the prefix of the logged message
6 PROCEDURE log_call_result
7 (p_module IN VARCHAR2,
8 p_prefix IN VARCHAR2,
9 p_return_status IN VARCHAR2,
10 p_msg_count IN NUMBER,
11 p_msg_data IN VARCHAR2,
12 p_name1 IN VARCHAR2 DEFAULT NULL,
13 p_value1 IN VARCHAR2 DEFAULT NULL,
14 p_name2 IN VARCHAR2 DEFAULT NULL,
15 p_value2 IN VARCHAR2 DEFAULT NULL,
16 p_name3 IN VARCHAR2 DEFAULT NULL,
17 p_value3 IN VARCHAR2 DEFAULT NULL
18 );
19
20 -- This procedure logs the current value of sqlerrm
21 PROCEDURE log_sqlerrm
22 (p_module IN VARCHAR2,
23 p_prefix IN VARCHAR2
24 );
25
26 -- This procedure returns the combined messages in fnd_msg_pub
27 PROCEDURE combine_fnd_msg
28 (p_msg_count IN NUMBER,
29 x_msg_data OUT nocopy VARCHAR2
30 );
31
32
33 -- Warning: The following 3 procedures/function should be used together
34 -- Please read the instruction carefully before using them.
35 --
36 -- Usage: say you want to log field names and values of a plsql record type variable.
37 -- 1. You should call set_msg_prefix so that your logs will share the common prefix
38 -- which you can use to correlate the logs.
39 -- 2. Then you call set_msg_module so that your logs will share the same log module
40 -- 3. Then you call log_field for each field name, and value.
41 -- 4. You will then call finish_log_field at the end.
42
43 g_msg fnd_log_messages.message_text%TYPE;
44 g_msg_prefix VARCHAR2(200);
45 g_msg_module fnd_log_messages.module%TYPE;
46
47 -- set common log message prefix
48 PROCEDURE set_msg_prefix (p_prefix IN VARCHAR2);
49
50 -- set common log message module
51 PROCEDURE set_msg_module (p_module IN VARCHAR2);
52
53 -- add field name and value to log
54 PROCEDURE log_field
55 (p_field_name IN VARCHAR2,
56 p_field_value IN VARCHAR2
57 );
58
59 -- call this procedure after logging all fields
60 PROCEDURE finish_log_field;
61
62 END pos_log;