70:
71: PROCEDURE CTO_DEBUG(
72: proc_name IN VARCHAR2,
73: text IN VARCHAR2) is
74: fname utl_file.file_type;
75:
76: BEGIN
77:
78: -- bugfix 2430063 : Only if OM:Debug Level is set to 5 or more, cto* debug
90: *
91: * select ltrim(rtrim(substr(value, instr(value,',',-1,1)+1)))
92: * into file_dir
93: * from v$parameter
94: * where name= 'utl_file_dir';
95: *
96: * -- end bugfix 3511114
97: * */
98:
100:
101: select ltrim(rtrim(value))
102: into file_dir
103: from (select value from v$parameter2
104: where name='utl_file_dir'
105: order by rownum desc)
106: where rownum <2;
107:
108: -- end bugfix 3511114
112: if CTO_WIP_WORKFLOW_API_PK.file_name is null then
113: file_name := 'cto_'||to_char(sysdate,'ddhh24miss')||'.dbg';
114: end if;
115:
116: fname := utl_file.fopen(CTO_WIP_WORKFLOW_API_PK.file_dir,CTO_WIP_WORKFLOW_API_PK.file_name,'a');
117: utl_file.put_line(fname,proc_name||'::'||text);
118: utl_file.fflush(fname);
119: utl_file.fclose(fname);
120:
113: file_name := 'cto_'||to_char(sysdate,'ddhh24miss')||'.dbg';
114: end if;
115:
116: fname := utl_file.fopen(CTO_WIP_WORKFLOW_API_PK.file_dir,CTO_WIP_WORKFLOW_API_PK.file_name,'a');
117: utl_file.put_line(fname,proc_name||'::'||text);
118: utl_file.fflush(fname);
119: utl_file.fclose(fname);
120:
121:
114: end if;
115:
116: fname := utl_file.fopen(CTO_WIP_WORKFLOW_API_PK.file_dir,CTO_WIP_WORKFLOW_API_PK.file_name,'a');
117: utl_file.put_line(fname,proc_name||'::'||text);
118: utl_file.fflush(fname);
119: utl_file.fclose(fname);
120:
121:
122: EXCEPTION
115:
116: fname := utl_file.fopen(CTO_WIP_WORKFLOW_API_PK.file_dir,CTO_WIP_WORKFLOW_API_PK.file_name,'a');
117: utl_file.put_line(fname,proc_name||'::'||text);
118: utl_file.fflush(fname);
119: utl_file.fclose(fname);
120:
121:
122: EXCEPTION
123: when OTHERS then
122: EXCEPTION
123: when OTHERS then
124: -- The exception handling is added by renga Kannan on 01/11/2001
125: -- We don't want to stop other functinality becauseo of CTO_DEBUG erros.
126: -- The example cases are if the customer sets the utl_file_dir value as * or .
127: -- We need not create the debug message and need not faile too.
128: null;
129:
130: END CTO_DEBUG;