DBA Data[Home] [Help]

PACKAGE BODY: APPS.XTR_DEBUG_PKG

Source


1 package body XTR_DEBUG_PKG as
2 /* $Header: xtrdebgb.pls 115.8 2003/07/30 17:09:26 rvallams ship $ */
3 --
4 --
5   pg_file_name    VARCHAR2(100)         := NULL;
6   pg_path_name    VARCHAR2(100)         := NULL;
7   pg_fp           utl_file.file_type;
8 
9 --
10 --
11 --
12 --
13 PROCEDURE enable_file_debug (path_name in varchar2,
14 			     file_name in varchar2) IS
15 
16 BEGIN
17 
18 -- RV: Bug 3011847 --
19    NULL;
20 
21 /*
22   if (pg_file_name is null) THEN
23 
24     IF not utl_file.is_open(pg_fp) THEN
25 
26        pg_fp := utl_file.fopen(path_name, file_name, 'w');
27     END IF;
28 
29     pg_file_name := file_name;
30     pg_path_name := path_name;
31     xtr_risk_debug_pkg.set_filehandle(pg_fp);
32   end if;
33 
34   EXCEPTION
35 
36     when utl_file.invalid_path then
37        RAISE_APPLICATION_ERROR(-20001, path_name ||
38 				' is an invalid file path!!!!!!');
39 --      app_exception.raise_exception;
40     when utl_file.invalid_mode then
41       app_exception.raise_exception;
42 */
43 
44 END ;
45 
46 
47 
48 --
49 --
50 --
51 --
52 PROCEDURE enable_file_debug  IS
53 
54 BEGIN
55 
56 -- RV: Bug 3011847 --
57    NULL;
58 
59 /*
60  pg_sqlplus_enable_flag := 1;
61  xtr_risk_debug_pkg.start_debug;
62 */
63 
64 END ;
65 
66 
67 
68 
69 
70 --
71 --
72 --
73 --
74 PROCEDURE disable_file_debug is
75 BEGIN
76 
77 -- RV: Bug 3011847 --
78    NULL;
79 
80 /*
81   if (pg_file_name is not null) and pg_file_name <> '' THEN
82     pg_file_name := NULL;
83     pg_path_name := NULL;
84     if utl_file.is_open(pg_fp) then
85        utl_file.fclose(pg_fp);
86     end if;
87     xtr_risk_debug_pkg.stop_debug;
88   end if;
89 */
90 
91 END;
92 
93 --
94 --
95 --
96 --
97 PROCEDURE debug( line in varchar2 ) is
98 
99   rest varchar2(32767);
100   buffer_overflow exception;
101   pragma exception_init(buffer_overflow, -20000);
102 
103 BEGIN
104 
105 -- RV: Bug 3011847 --
106 
107   if( FND_LOG.LEVEL_PROCEDURE >= FND_LOG.G_CURRENT_RUNTIME_LEVEL ) then
108     FND_LOG.STRING(FND_LOG.LEVEL_PROCEDURE,
109         'xtr', line);
110   end if;
111 
112 /*
113     IF (pg_file_name IS NOT NULL) or utl_file.is_open(pg_fp) THEN
114 
115       utl_file.put_line(pg_fp, line);
116       utl_file.fflush(pg_fp);
117 
118     END IF;
119 
120    if ( pg_sqlplus_enable_flag = 1 ) then
121     --dbms_output.put_line(line);
122 fnd_file.put_line(fnd_file.log, line);
123 
124    end if;
125 
126 EXCEPTION
127 
128   when buffer_overflow then
129       null;  -- buffer overflow, ignore
130   when others then
131       raise;
132 */
133 
134 END;
135 
136 
137 
138 PROCEDURE set_filehandle (p_FileHandle utl_file.file_type := NULL) IS
139 
140 BEGIN
141 
142 -- RV: Bug 3011847 --
143    NULL;
144 
145 /*
146   IF not utl_file.is_open(pg_fp) and utl_file.is_open(p_FileHandle) THEN
147 
148     pg_fp := p_FileHandle;
149   END IF;
150 */
151 
152 END set_filehandle;
153 
154 END XTR_DEBUG_PKG;