50: BEGIN
51:
52:
53: -- Ignore open_debug_session call if package debugging mode is already ON
54: IF ( g_debug_flag AND Error_Handler.Get_Debug = 'Y' ) THEN
55: RETURN ;
56: END IF ;
57:
58: l_found := 0 ;
55: RETURN ;
56: END IF ;
57:
58: l_found := 0 ;
59: Error_Handler.initialize();
60: Error_Handler.set_bo_identifier(G_BO_IDENTIFIER);
61:
62: ---------------------------------------------------------------------------------
63: -- Open_Debug_Session should set the value
56: END IF ;
57:
58: l_found := 0 ;
59: Error_Handler.initialize();
60: Error_Handler.set_bo_identifier(G_BO_IDENTIFIER);
61:
62: ---------------------------------------------------------------------------------
63: -- Open_Debug_Session should set the value
64: -- appropriately, so that when the Debug Session is successfully opened :
61:
62: ---------------------------------------------------------------------------------
63: -- Open_Debug_Session should set the value
64: -- appropriately, so that when the Debug Session is successfully opened :
65: -- will return Error_Handler.Get_Debug = 'Y', else Error_Handler.Get_Debug = 'N'
66: ---------------------------------------------------------------------------------
67:
68: IF p_output_dir IS NOT NULL THEN
69: g_output_dir := p_output_dir ;
107: END IF ;
108:
109: -----------------------------------------------------------------------
110: -- To open the Debug Session to write the Debug Log. --
111: -- This sets Debug value so that Error_Handler.Get_Debug returns 'Y' --
112: -----------------------------------------------------------------------
113: Error_Handler.Open_Debug_Session(
114: p_debug_filename => g_debug_filename
115: ,p_output_dir => g_output_dir
109: -----------------------------------------------------------------------
110: -- To open the Debug Session to write the Debug Log. --
111: -- This sets Debug value so that Error_Handler.Get_Debug returns 'Y' --
112: -----------------------------------------------------------------------
113: Error_Handler.Open_Debug_Session(
114: p_debug_filename => g_debug_filename
115: ,p_output_dir => g_output_dir
116: ,x_return_status => l_log_return_status
117: ,x_error_mesg => l_errbuff
146: IS
147: BEGIN
148:
149: -----------------------------------------------------------------------------
150: -- Close Error_Handler debug session, only if Debug session is already open.
151: -----------------------------------------------------------------------------
152: IF (Error_Handler.Get_Debug = 'Y') THEN
153: Error_Handler.Close_Debug_Session;
154: END IF;
148:
149: -----------------------------------------------------------------------------
150: -- Close Error_Handler debug session, only if Debug session is already open.
151: -----------------------------------------------------------------------------
152: IF (Error_Handler.Get_Debug = 'Y') THEN
153: Error_Handler.Close_Debug_Session;
154: END IF;
155:
156: g_debug_flag := FALSE;
149: -----------------------------------------------------------------------------
150: -- Close Error_Handler debug session, only if Debug session is already open.
151: -----------------------------------------------------------------------------
152: IF (Error_Handler.Get_Debug = 'Y') THEN
153: Error_Handler.Close_Debug_Session;
154: END IF;
155:
156: g_debug_flag := FALSE;
157:
167: PROCEDURE Write_Debug
168: ( p_debug_message IN VARCHAR2 )
169: IS
170: BEGIN
171: -- Sometimes Error_Handler.Write_Debug would not write
172: -- the debug message properly
173: -- So as workaround, I added special developer debug mode here
174: -- to write debug message forcedly
175: IF (TO_NUMBER(g_profile_debug_level) = 999)
181: );
182:
183: END IF ;
184:
185: Error_Handler.Write_Debug('['||TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS')||'] '|| p_debug_message);
186:
187: EXCEPTION
188: WHEN OTHERS THEN
189: g_debug_errmesg := Substr(To_Char(SQLCODE)||'/'||SQLERRM,1,240);
217: OR FND_API.to_Boolean(p_debug_flag)
218: THEN
219:
220: ----------------------------------------------------------------------------------
221: -- Opens Error_Handler debug session, only if Debug session is not already open.
222: -- Suggested by RFAROOK, so that multiple debug sessions are not open PER
223: -- Concurrent Request.
224: ----------------------------------------------------------------------------------
225: IF (Error_Handler.Get_Debug <> 'Y') THEN
221: -- Opens Error_Handler debug session, only if Debug session is not already open.
222: -- Suggested by RFAROOK, so that multiple debug sessions are not open PER
223: -- Concurrent Request.
224: ----------------------------------------------------------------------------------
225: IF (Error_Handler.Get_Debug <> 'Y') THEN
226: Open_Debug_Session(p_output_dir => p_output_dir, p_file_name => p_file_name) ;
227: END IF;
228:
229: END IF;