3: --
4: G_PKG_NAME CONSTANT VARCHAR2(50) := 'WSH_ITM_ASYN_MSGMAP_ASSISTANT';
5: G_ITM_LOG_LEVEL WSH_ITM_PARAMETER_SETUPS_B.VALUE%TYPE;
6: G_LOG_FILENAME VARCHAR2(100);
7: G_FILE_PTR UTL_FILE.File_Type;
8: G_REQ_CONTROL_ID VARCHAR(50); --Bug 9226895 changed from number
9: G_PRV_REQ_CONTROL_ID VARCHAR(50):= '-1';--Bug 9226895
10: G_DEBUG_PROCESS BOOLEAN;
11: --
597: END IF;
598: --
599: END MESSAGE_POSTPROCESS;
600: PROCEDURE Initialize_Debug(p_reference_id VARCHAR2) IS
601: l_file_ptr UTL_FILE.File_Type;
602: l_log_directory VARCHAR2(4000);
603: l_log_filename VARCHAR2(100);
604: l_dbg_level VARCHAR2(100);
605: l_dbg_module VARCHAR2(100);
641: --Generating log file for each Request Control even if it processed
642: --within one concurrent process
643: --Close the file if its already open
644: IF G_PRV_REQ_CONTROL_ID <> G_REQ_CONTROL_ID THEN
645: IF utl_file.is_open(g_file_ptr) THEN
646: utl_file.fclose(g_file_ptr);
647: END IF;
648: END IF;
649:
642: --within one concurrent process
643: --Close the file if its already open
644: IF G_PRV_REQ_CONTROL_ID <> G_REQ_CONTROL_ID THEN
645: IF utl_file.is_open(g_file_ptr) THEN
646: utl_file.fclose(g_file_ptr);
647: END IF;
648: END IF;
649:
650: G_PRV_REQ_CONTROL_ID := G_REQ_CONTROL_ID;
660: --G_LOG_FILENAME := 'wshitm_async_' || g_req_control_id || '.dbg';
661:
662: G_LOG_FILENAME := 'wshitm_' || g_req_control_id || '_' || to_char(sysdate,'MMYYHH24MISS') ||'.dbg';
663:
664: l_file_ptr := UTL_FILE.Fopen(l_log_directory, G_LOG_FILENAME, 'a');
665:
666: --Debug messages will be generated in a log file instead of
667: --being printed in concurrent request log file
668: WSH_DEBUG_SV.G_ITM_ASYN_PROC := TRUE;
732: END IF;
733: --
734:
735: IF ( G_DEBUG_PROCESS ) THEN
736: IF utl_file.is_open(g_file_ptr) THEN
737: utl_file.fclose(g_file_ptr);
738: END IF;
739: END IF;
740:
733: --
734:
735: IF ( G_DEBUG_PROCESS ) THEN
736: IF utl_file.is_open(g_file_ptr) THEN
737: utl_file.fclose(g_file_ptr);
738: END IF;
739: END IF;
740:
741: -- Added Exception handler so that we will proceed further