15:
16: if P_MODE = 'FILE' then
17:
18: G_DEBUG_MODE := 'FILE';
19: OE_DEBUG_PUB.G_DEBUG_MODE := 'FILE';
20: if G_FILE is null then
21: --IF (ASO_DEBUG_PUB.G_FILE is NULL OR ASO_DEBUG_PUB.G_FILE <> 'ASO'||FND_GLOBAL.USER_NAME||'.dbg') Then
22: select aso_debug_file_s.nextval
23: into l_dbgfile_number
28: || fnd_global.user_name
29: || '.dbg';
30:
31: G_FILE_PTR := utl_file.fopen(G_DIR, G_FILE, 'a');
32: oe_debug_pub.G_FILE_PTR := G_FILE_PTR;
33: end if;
34: rtn_val := G_DIR || '/' || g_file;
35: elsif P_MODE = 'CONC' then
36: --G_DEBUG_MODE := 'CONC';
58: G_Debug_tbl.DELETE;
59: G_Debug_count := 0;
60: G_Debug_index := 0;
61:
62: OE_DEBUG_PUB.G_Debug_tbl.DELETE;
63: OE_DEBUG_PUB.G_Debug_count := 0;
64: OE_DEBUG_PUB.G_Debug_index := 0;
65: OE_DEBUG_PUB.G_DIR := ASO_DEBUG_PUB.G_DIR;
66: OE_DEBUG_PUB.G_FILE := ASO_DEBUG_PUB.G_FILE;
59: G_Debug_count := 0;
60: G_Debug_index := 0;
61:
62: OE_DEBUG_PUB.G_Debug_tbl.DELETE;
63: OE_DEBUG_PUB.G_Debug_count := 0;
64: OE_DEBUG_PUB.G_Debug_index := 0;
65: OE_DEBUG_PUB.G_DIR := ASO_DEBUG_PUB.G_DIR;
66: OE_DEBUG_PUB.G_FILE := ASO_DEBUG_PUB.G_FILE;
67:
60: G_Debug_index := 0;
61:
62: OE_DEBUG_PUB.G_Debug_tbl.DELETE;
63: OE_DEBUG_PUB.G_Debug_count := 0;
64: OE_DEBUG_PUB.G_Debug_index := 0;
65: OE_DEBUG_PUB.G_DIR := ASO_DEBUG_PUB.G_DIR;
66: OE_DEBUG_PUB.G_FILE := ASO_DEBUG_PUB.G_FILE;
67:
68: END Initialize;
61:
62: OE_DEBUG_PUB.G_Debug_tbl.DELETE;
63: OE_DEBUG_PUB.G_Debug_count := 0;
64: OE_DEBUG_PUB.G_Debug_index := 0;
65: OE_DEBUG_PUB.G_DIR := ASO_DEBUG_PUB.G_DIR;
66: OE_DEBUG_PUB.G_FILE := ASO_DEBUG_PUB.G_FILE;
67:
68: END Initialize;
69:
62: OE_DEBUG_PUB.G_Debug_tbl.DELETE;
63: OE_DEBUG_PUB.G_Debug_count := 0;
64: OE_DEBUG_PUB.G_Debug_index := 0;
65: OE_DEBUG_PUB.G_DIR := ASO_DEBUG_PUB.G_DIR;
66: OE_DEBUG_PUB.G_FILE := ASO_DEBUG_PUB.G_FILE;
67:
68: END Initialize;
69:
70:
72: IS
73: Begin
74: ASO_DEBUG_PUB.G_DEBUG := FND_API.G_TRUE;
75: -- bug 9040436
76: if OE_DEBUG_PUB.G_DEBUG= FND_API.G_FALSE then
77: OE_DEBUG_PUB.G_DEBUG := FND_API.G_TRUE;
78: end if;
79: End Debug_On;
80:
73: Begin
74: ASO_DEBUG_PUB.G_DEBUG := FND_API.G_TRUE;
75: -- bug 9040436
76: if OE_DEBUG_PUB.G_DEBUG= FND_API.G_FALSE then
77: OE_DEBUG_PUB.G_DEBUG := FND_API.G_TRUE;
78: end if;
79: End Debug_On;
80:
81:
82: Procedure Debug_OFF
83: IS
84: Begin
85: ASO_DEBUG_PUB.G_DEBUG := FND_API.G_FALSE;
86: OE_DEBUG_PUB.G_DEBUG := FND_API.G_FALSE;
87: End Debug_Off;
88:
89:
90: Function ISDebugOn
138: aso_debug_pub.SetDebugLevel(10);
139: l_fname := set_debug_mode('FILE');
140: -- I could not test this, But this is the problem. This should be set after
141: -- set_debug_mode call, other G_FILE will be null
142: OE_DEBUG_PUB.G_DIR := ASO_DEBUG_PUB.G_DIR;
143: OE_DEBUG_PUB.G_FILE := ASO_DEBUG_PUB.G_FILE;
144: utl_file.put_line(G_FILE_PTR, 'Hello Sir, U have Opened a New Session');
145: else
146: ASO_DEBUG_PUB.G_FILE := 'OFF';
139: l_fname := set_debug_mode('FILE');
140: -- I could not test this, But this is the problem. This should be set after
141: -- set_debug_mode call, other G_FILE will be null
142: OE_DEBUG_PUB.G_DIR := ASO_DEBUG_PUB.G_DIR;
143: OE_DEBUG_PUB.G_FILE := ASO_DEBUG_PUB.G_FILE;
144: utl_file.put_line(G_FILE_PTR, 'Hello Sir, U have Opened a New Session');
145: else
146: ASO_DEBUG_PUB.G_FILE := 'OFF';
147: return;
294: Procedure SetDebugLevel(p_debug_level in number)
295: IS
296: Begin
297: ASO_DEBUG_PUB.G_DEBUG_LEVEL := p_debug_level;
298: OE_DEBUG_PUB.G_DEBUG_LEVEL := p_debug_level;
299: End SetDebugLevel;
300:
301: procedure disable_debug_pvt is
302: begin
301: procedure disable_debug_pvt is
302: begin
303: ASO_DEBUG_PUB.Debug_off;
304: ASO_DEBUG_PUB.G_FILE := null;
305: OE_DEBUG_PUB.Debug_off;
306: OE_DEBUG_PUB.G_FILE := null;
307: If utl_file.is_Open(ASO_DEBUG_PUB.G_FILE_PTR) Then
308: utl_file.fclose(ASO_DEBUG_PUB.G_FILE_PTR);
309: End If;
302: begin
303: ASO_DEBUG_PUB.Debug_off;
304: ASO_DEBUG_PUB.G_FILE := null;
305: OE_DEBUG_PUB.Debug_off;
306: OE_DEBUG_PUB.G_FILE := null;
307: If utl_file.is_Open(ASO_DEBUG_PUB.G_FILE_PTR) Then
308: utl_file.fclose(ASO_DEBUG_PUB.G_FILE_PTR);
309: End If;
310: exception