1. Call log function inside the procedure:
procedure my_procedure
is
begin
.....
IF $$debug_code
THEN
pkg_log.write_log ('Log message');
END IF;
....
end;
2. Switch logging on with
alter package pkg_name compile body plsql_ccflags = 'debug_code:true' reuse settings;
|