82:
83: PROCEDURE write_log (p_msg varchar2) IS
84:
85: -- This procedure logs errors and information messages
86: -- The variable g_log_flag is used as a flag whether to use fnd_file.put_line
87: -- or not.
88: -- If it is set to null, error messages are logged to fnd_file.
89: -- If it set to some value, the message can be printed using dbms_output
90: -- instead of fnd_file.put_line.
84:
85: -- This procedure logs errors and information messages
86: -- The variable g_log_flag is used as a flag whether to use fnd_file.put_line
87: -- or not.
88: -- If it is set to null, error messages are logged to fnd_file.
89: -- If it set to some value, the message can be printed using dbms_output
90: -- instead of fnd_file.put_line.
91: -- This is used only during developement and testing as fnd_file
92: -- can not be used from the SQL prompt.
86: -- The variable g_log_flag is used as a flag whether to use fnd_file.put_line
87: -- or not.
88: -- If it is set to null, error messages are logged to fnd_file.
89: -- If it set to some value, the message can be printed using dbms_output
90: -- instead of fnd_file.put_line.
91: -- This is used only during developement and testing as fnd_file
92: -- can not be used from the SQL prompt.
93:
94: BEGIN
87: -- or not.
88: -- If it is set to null, error messages are logged to fnd_file.
89: -- If it set to some value, the message can be printed using dbms_output
90: -- instead of fnd_file.put_line.
91: -- This is used only during developement and testing as fnd_file
92: -- can not be used from the SQL prompt.
93:
94: BEGIN
95: IF g_log_output IS NULL THEN
92: -- can not be used from the SQL prompt.
93:
94: BEGIN
95: IF g_log_output IS NULL THEN
96: fnd_file.put_line
97: (fnd_file.log,substr(p_msg || ': ' || g_proc_name,1,350) ||
98: to_char(sysdate,'dd-mon-yy hh24:mi:ss'));
99: END IF;
100:
93:
94: BEGIN
95: IF g_log_output IS NULL THEN
96: fnd_file.put_line
97: (fnd_file.log,substr(p_msg || ': ' || g_proc_name,1,350) ||
98: to_char(sysdate,'dd-mon-yy hh24:mi:ss'));
99: END IF;
100:
101: END write_log;