91: END IF ;
92:
93: -----------------------------------------------------------------------
94: -- To open the Debug Session to write the Debug Log. --
95: -- This sets Debug value so that Error_Handler.Get_Debug returns 'Y' --
96: -----------------------------------------------------------------------
97: Error_Handler.Open_Debug_Session(
98: p_debug_filename => g_debug_filename
99: ,p_output_dir => g_output_dir
93: -----------------------------------------------------------------------
94: -- To open the Debug Session to write the Debug Log. --
95: -- This sets Debug value so that Error_Handler.Get_Debug returns 'Y' --
96: -----------------------------------------------------------------------
97: Error_Handler.Open_Debug_Session(
98: p_debug_filename => g_debug_filename
99: ,p_output_dir => g_output_dir
100: ,x_return_status => l_log_return_status
101: ,x_error_mesg => l_errbuff
195: OR FND_API.to_Boolean(p_debug_flag)
196: THEN
197:
198: ----------------------------------------------------------------------------------
199: -- Opens Error_Handler debug session, only if Debug session is not already open.
200: -- Suggested by RFAROOK, so that multiple debug sessions are not open PER
201: -- Concurrent Request.
202: ----------------------------------------------------------------------------------
203: IF (Error_Handler.Get_Debug <> 'Y') THEN
199: -- Opens Error_Handler debug session, only if Debug session is not already open.
200: -- Suggested by RFAROOK, so that multiple debug sessions are not open PER
201: -- Concurrent Request.
202: ----------------------------------------------------------------------------------
203: IF (Error_Handler.Get_Debug <> 'Y') THEN
204:
205: FND_FILE.put_line(FND_FILE.LOG, G_PKG_NAME || ' Error_Handler.Get_Debug is not Y, calling Open_Debug_Session ');
206: Open_Debug_Session(p_output_dir => p_output_dir, p_file_name => p_file_name) ;
207: END IF;
201: -- Concurrent Request.
202: ----------------------------------------------------------------------------------
203: IF (Error_Handler.Get_Debug <> 'Y') THEN
204:
205: FND_FILE.put_line(FND_FILE.LOG, G_PKG_NAME || ' Error_Handler.Get_Debug is not Y, calling Open_Debug_Session ');
206: Open_Debug_Session(p_output_dir => p_output_dir, p_file_name => p_file_name) ;
207: END IF;
208:
209: END IF;
252: l_error_mesg VARCHAR2(2000) ;
253: BEGIN
254:
255:
256: -- Sometimes Error_Handler.Write_Debug would not write
257: -- the debug message properly
258: -- So as workaround, I added special developer debug mode here
259: -- to write debug message forcedly
260: IF (TO_NUMBER(g_profile_debug_level) = 999)
266: );
267:
268: END IF ;
269:
270: Error_Handler.Write_Debug('['||TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS')||'] '|| p_debug_message);
271:
272: /*****
273: IF utl_file.is_open(g_debug_file)
274: THEN