DBA Data[Home] [Help]

PACKAGE: APPS.ASO_DEBUG_PUB

Source


1 PACKAGE ASO_DEBUG_PUB as
2 /* $Header: asoidbgs.pls 120.1 2005/06/29 12:33:06 appldev ship $ */
3 -- Start of Comments
4 -- Package name     : ASO_DEBUG_PUB
5 -- Purpose          :
6 -- History          :
7 -- NOTE             :
8 -- End of Comments
9 
10 --   Record Type:
11 
12     G_PKG_NAME  CONSTANT    VARCHAR2(15):=  'ASO_DEBUG_PUB';
13 
14 --  API Debugging table type
15 --
16 --      PL/SQL table of VARCHAR2(2000)
17 
18 G_DEBUG_LEN        CONSTANT Number := 500;
19 TYPE Debug_tbl_type IS TABLE OF VARCHAR2(500)
20      INDEX BY BINARY_INTEGER;
21 
22     G_Debug_Tbl                 Debug_Tbl_Type;
23 
24 --  Global variable holding the Debug count.
25 
26     G_Debug_count   NUMBER := 0;
27 
28 --  Global variable holding the desired debug_level.
29 
30     /* G_Debug_Level   NUMBER := to_number(nvl(
31 		fnd_profile.value('ONT_DEBUG_LEVEL'), '0')); */
32 
33     G_Debug_Level   NUMBER := 10;
34 
35 --  Index used by the Get function to keep track of the last fetched
36 --  Debug.
37 
38     G_Debug_index   NUMBER     := 0;
39 --  Flag to indicate if the debugging is on.
40 --  The call to procedure ADD will add the string to the debug cache
41     G_DEBUG      Varchar2(1)    := FND_API.G_FALSE;
42     --G_DEBUG_MODE VARCHAR2(30)   := 'TABLE';
43     G_DEBUG_MODE VARCHAR2(30)   := 'FILE';
44                                 -- Table , default mode
45                                 -- file , write to log file
46      --G_DIR         Varchar2(255)     := nvl(fnd_profile.value ('ASO_DEBUG_LOG_DIRECTORY'), '/tmp');
47 
48      G_DIR         Varchar2(255)     := nvl(fnd_profile.value ('OE_DEBUG_LOG_DIRECTORY'), '/tmp');
49 
50     --G_DIR         Varchar2(255)     := '/private/home/oracle/vmohan';
51 
52     G_FILE        Varchar2(255)     := null;
53     G_FILE_PTR    utl_file.file_type;
54 
55     -- global debug flag
56     G_DEBUG_FLAG    Varchar2(1) := 'N';
57 
58 /* Name   Set_Debug_mode
59 ** Purpose Sets the debug mode to be FILE or TABLE.
60 ** It will set the debug mode to FILE if specified so else
61 ** the mode is set to TABLE, It reuturns the name of the file if
62 ** the mode desired is FILE else returns null
63 */
64 Function Set_Debug_Mode(P_Mode in varchar2) Return Varchar2;
65 /* Name   Initialize
66 ** Purpose Clears the debug cache. Use this procedure to clear OUT the
67 ** any debugging statments cached in the debug table.
68 */
69 PROCEDURE Initialize;
70 /* Name   Debug_On
71 ** Purpose To Turn the debugging on. Use this proceudre to enable debuging
72 ** for the current sesssion. Any subsquent call to the statment add will result
73 ** in the debug statments cached to the debug table
74 */
75 Procedure Debug_ON;
76 /* Name   Debug_Off
77 ** Purpose To Turn off the debugging. Use this proceudre to disable debugging
78 ** for the current sesssion. Call to ADD will be ignored. Please note that
79 ** Function does not clear the cache and any debuging information is retained
80 */
81 Procedure Debug_OFF;
82 /* Name   IsDebugOn
83 ** Purpose To test if the debugging is enabled.
84 */
85 Function ISDebugOn Return Boolean;
86 /* Name   CountDebug
87 ** Purpose To get the number of debugging message cached
88 */
89 FUNCTION CountDebug RETURN NUMBER;
90 /* Name   Add
91 ** Purpose To add a debugging message. This message will be placed in
92 ** the table only if the debuggin is turned on.
93 */
94 PROCEDURE Add(debug_msg in Varchar2, debug_level in Number default 1, print_date in varchar2 default 'N');
95 /* Name   GetFirst
96 ** Purpose To Get the First Message. This prcocude will reset the debug index
97 */
98 Procedure GetFirst(Debug_msg OUT NOCOPY /* file.sql.39 change */  Varchar2);
99 /* Name   GetNext
100 ** Purpose To Get the Next Message from the  debug cache.
101 ** This Procedure will increment the debug index  by one
102 */
103 Procedure GetNext(debug_msg OUT NOCOPY /* file.sql.39 change */  varchar2);
104 /* Name  GetNextBuffer
105 ** Purpose To Get the Next Set of message separted by a new line
106 ** The routine will concatnate the message until reaching the end of the
107 ** mesage cache or the total messages exceed as specified in the p_msg_count
108 ** This Procedure will increment the debug index  acordingly
109 */
110 Procedure GetNextBuffer( p_debug_msg IN OUT NOCOPY /* file.sql.39 change */  varchar2);
111 /* Name DumpDebug
112 ** Purpose To disply debug message from the sql prompt.
113 ** This routine will display all the mesages in the cahce using the procedure
114 ** dbms_out.put_line.
115 */
116 PROCEDURE DumpDebug;
117 /* Name ResetIndex
118 ** resest the debug index, setting the index pointer to the beginging of the
119 ** cache
120 */
121 Procedure ResetIndex;
122 
123 /* Name SetDebugLevel (p_debug_level in number);
124 ** Set g_debug_level to the desired one
125 */
126 Procedure SetDebugLevel(p_debug_level in number);
127 
128 procedure disable_debug_pvt;
129 
130 
131 END ASO_DEBUG_PUB;