SP_LOG
来源:互联网 发布:能看nba的mac直播软件 编辑:程序博客网 时间:2024/05/14 20:35
begin
--查询系统参数表中的日志级别
select paramvalue, nvl(defaultvalue,'2'),paramrule
into v_dsloglevel,v_defaultval,v_paramrule
from st_systemparameter
where upper(paramname) = upper('DB_LogLevel');
select count(*)
into v_exist
from dual
where regexp_like(v_dsloglevel,v_paramrule);
if v_exist = 0 then
v_dsloglevel := v_defaultval;
--dbms_output.put_line(v_dsloglevel||'v_dsloglevel');
end if;
if i_loglevel >= v_dsloglevel then
insert into st_runlog
(runtime, procname, errcode, spendtime, levels, description)
values
(sysdate,
i_swhere,
i_show,
substr(i_spendtime, 1, 10),
i_loglevel,
i_swhat);
--with RS;
commit;
end if;