Project: Project ( XPP 1. SOFTWAROV┴ s.r.o.)
Description: Package for loging trace log into XPP_TRACE_LOG table.


@author Petr Jezek
@version 2.0.1, 2012-09-19
@since 1.0
@headcom


Method Summary
 add_log( p_severity_id in number , p_procedure_name in varchar2 , p_msg in varchar2 )
          
           It is initially loading value of global variable g_log_level from XPP_CONF_PARAM.
           When configuration is not set correctly the debug level, then it raise exception MISSING_DEBUG_LEVEL.
           According the debug level is apropriate call of log_trace inserted record into XPP_TRACE_LOG table.
           Note: Part of the insert into log is pragma autonomous_transaction.
          


          

 clean_old_logs
          
           It is maintance procedure to delete old data in XPP_TRACE_LOG table.
           There is expected in table XPP_CONF_PARAM configuration (NAME = 'CLEAN_OLDER_THEN_X_DAYS') with number of days.
           Records in XPP_TRACE_LOG older then CLEAN_OLDER_THEN_X_DAYS days will be automaticly delete weekly by job.
           Note: Part of the insert into log is pragma autonomous_transaction.
          


          

Method Detail

add_log

          add_log( p_severity_id in number , p_procedure_name in varchar2 , p_msg in varchar2 ) 
          
           It is initially loading value of global variable g_log_level from XPP_CONF_PARAM.
           When configuration is not set correctly the debug level, then it raise exception MISSING_DEBUG_LEVEL.
           According the debug level is apropriate call of log_trace inserted record into XPP_TRACE_LOG table.
           Note: Part of the insert into log is pragma autonomous_transaction.
          


          

Parameters:
p_severity_id - Specifies severity level. Possible values are: 1 - fatal, 2 - error, 3 - warning, 4 - info, 5 - debug
p_procedure_name - The name of procedure identify the procedure where was cerated the log record
p_msg - The content of message for the log (table XPP_TRACE_LOG).
Throws:
c_err_missing_debug_level - There is missing configuration of log level in XPP_CONF_PARAM table. The should be column NAME = 'LOG_LEVEL' with column VAL with numeric value. Then of VAL should be one of the "List of statuses"

clean_old_logs

          clean_old_logs
          
           It is maintance procedure to delete old data in XPP_TRACE_LOG table.
           There is expected in table XPP_CONF_PARAM configuration (NAME = 'CLEAN_OLDER_THEN_X_DAYS') with number of days.
           Records in XPP_TRACE_LOG older then CLEAN_OLDER_THEN_X_DAYS days will be automaticly delete weekly by job.
           Note: Part of the insert into log is pragma autonomous_transaction.
          


          

Parameters:
none - There are no parameters.
Throws:
c_err_missing_maintance_par - there is missing configuration of log level in XPP_CONF_PARAM table (in table XPP_CONF_PARAM should be column NAME = 'CLEAN_OLDER_THEN_X_DAYS' where column VAL with is numeric value and higer then 0).