Log - Package
E Möglichkeit es eigenigs Logging z'mache
create or replace package k.RBSC$LOG# is
-------------------------------------------------------------------------------------------------------------
-- DESCRIPTION
-- PL/SQL package containing the RBSC implementation of logging
-- functions to access the RBSC logging configuration table.
--
-- Log levels start with a parent root (which is the default level). If
-- this parent logger is not found then a hardcoded default level is used
-- (c_default_level).
--
-- If a logger is set to level X, all messages belonging to lower levels
-- (level <= X) will be displayed. i.e. set logger to WARN, ERROR and WARN
-- will be displayed but not DEBUG.
--
-- Hirarchy:
-- To set a hirarchy the dot notation is used. If you set a logger "rbsc.xxx"
-- to DEBUG, and "rbsc" to WARN, then only those messages belonging to
-- "rbsc.xxx" will be displayed:
-- rbsc$log.debug('rbsc', 'Message will not be shown');
-- rbsc$log.debug('rbsc.xxx', 'Message will be shown');
--
-- Changing Config:
-- You can modify, add and delete loggers.
-- To modify/add a logger you can call the following command:
-- -> exec rbsc$log#.upsert_logger(i_logger => 'rbsc', i_log_level => 'debug');
--
-- Possible log levels are:
-- - debug
-- - info
-- - warn
-- - error
--
c_log_level_error constant number := 2;
c_log_level_warn constant number := 4;
c_log_level_info constant number := 6;
c_log_level_debug constant number := 8;
-- If a logger isnt found, the default log level will be returned
c_default_level constant number := c_log_level_warn;
function logger#log_level(
i_logger varchar2
)
return number;
function logger#is_enbl(
i_logger varchar2
,i_log_level number
)
return boolean;
function log_level#by_name(
i_log_level varchar2
)
return number;
procedure log_config#notify_all;
procedure log_config#reload;
procedure upsert_logger(
i_logger varchar2
,i_log_level varchar2
);
end RBSC$LOG#;