20:
21: CURSOR get_log_file_location IS
22: SELECT NVL( SUBSTR( value, 1, instr( value, ',')-1), value)
23: FROM v$parameter
24: WHERE name = 'utl_file_dir';
25:
26:
27: l_log UTL_FILE.file_type;
28: l_file_name VARCHAR2(80);
23: FROM v$parameter
24: WHERE name = 'utl_file_dir';
25:
26:
27: l_log UTL_FILE.file_type;
28: l_file_name VARCHAR2(80);
29:
30: BEGIN
31:
43: FETCH get_log_file_location into g_location;
44: CLOSE get_log_file_location;
45: END IF;
46:
47: l_log := UTL_FILE.fopen(g_location, l_file_name, 'a');
48: IF UTL_FILE.IS_OPEN(l_log) THEN
49: UTL_FILE.put_line(l_log, p_msg);
50: UTL_FILE.fflush(l_log);
51: UTL_FILE.fclose(l_log);
44: CLOSE get_log_file_location;
45: END IF;
46:
47: l_log := UTL_FILE.fopen(g_location, l_file_name, 'a');
48: IF UTL_FILE.IS_OPEN(l_log) THEN
49: UTL_FILE.put_line(l_log, p_msg);
50: UTL_FILE.fflush(l_log);
51: UTL_FILE.fclose(l_log);
52: END IF;
45: END IF;
46:
47: l_log := UTL_FILE.fopen(g_location, l_file_name, 'a');
48: IF UTL_FILE.IS_OPEN(l_log) THEN
49: UTL_FILE.put_line(l_log, p_msg);
50: UTL_FILE.fflush(l_log);
51: UTL_FILE.fclose(l_log);
52: END IF;
53: END IF;
46:
47: l_log := UTL_FILE.fopen(g_location, l_file_name, 'a');
48: IF UTL_FILE.IS_OPEN(l_log) THEN
49: UTL_FILE.put_line(l_log, p_msg);
50: UTL_FILE.fflush(l_log);
51: UTL_FILE.fclose(l_log);
52: END IF;
53: END IF;
54:
47: l_log := UTL_FILE.fopen(g_location, l_file_name, 'a');
48: IF UTL_FILE.IS_OPEN(l_log) THEN
49: UTL_FILE.put_line(l_log, p_msg);
50: UTL_FILE.fflush(l_log);
51: UTL_FILE.fclose(l_log);
52: END IF;
53: END IF;
54:
55: EXCEPTION