I'm having a message_log table with ID, Severity Level, Message, Log Date & Time.
I'm using below procedure to insert log messages to log table in my PL/SQL scripts.
add_log(ID,'START','DEBUG','No CDR Detail to be processed', sysdate);
But in case of failure I see some message are not getting logged. What is the best method to log step by step progress of a plsql progress (until failure point if needed)?
create or replace procedure add_log
(stp varchar2, code varchar2, log_message varchar2, logdat date)
is
begin
insert into message_log
(SEQ,PROC_STEP,
CODE,
LOG_MESSAGE,
LOG_DATE
)
values
(log_SEQ.NEXTVAL,stp,code,log_message,logdat)
;
end;