TheBigApp


Package logg

Project: Test Project (PLDoc)
Description: Logging of PL/SQL code events and data that caused the events
DB impact: YES
Commit inside: YES
Rollback inside: NO


Type Summary
 logs%ROWTYPELog_Record()
          
 TABLE OF Log_Record INDEX BY BINARY_INTEGERLog_Table()
          

Method Summary
 add_error(txt VARCHAR2, loc VARCHAR2, proc VARCHAR2, pck VARCHAR2, sch VARCHAR2, usr VARCHAR2, err VARCHAR2, dtime DATE)
           Records an ERROR in the error logging table.
 add_record(p_type VARCHAR2, txt VARCHAR2, loc VARCHAR2, proc VARCHAR2, pck VARCHAR2, sch VARCHAR2, usr VARCHAR2, err VARCHAR2, dtime DATE)
           Records an event in the error logging table.
 add_trace(txt VARCHAR2, loc VARCHAR2, proc VARCHAR2, pck VARCHAR2, sch VARCHAR2, usr VARCHAR2, err VARCHAR2, dtime DATE)
           Records an WARNING in the error logging table.
 add_warning(txt VARCHAR2, loc VARCHAR2, proc VARCHAR2, pck VARCHAR2, sch VARCHAR2, usr VARCHAR2, err VARCHAR2, dtime DATE)
           Records an WARNING in the error logging table.
 Clean()
           Clear pending logs
 Flush()
           Saves pending logs into the log table
 Show_Output()
           Shows pending logs on DBMS_OUTPUT, without erasing them

Type Detail

Log_Record

  public logs%ROWTYPE Log_Record()

Log_Table

  public TABLE OF Log_Record INDEX BY BINARY_INTEGER Log_Table()

Method Detail

add_error

  public  add_error(txt VARCHAR2, 
loc VARCHAR2,
proc VARCHAR2,
pck VARCHAR2,
sch VARCHAR2,
usr VARCHAR2,
err VARCHAR2,
dtime DATE)
Records an ERROR in the error logging table. NB: the level filter may prevent the record to be actually written. (values of variables, parameters etc)
Parameters:
txt - text containing the context of the situation (values of variables, parameters etc)
loc - location in code (denoted by some ID which is unique in the procedure/function)
proc - procedure or function name
pck - package name
sch - database schema name
usr - application user name (if NULL, USER will be written)
err - Error text
dtime - datetime (if NULL, sysdate is used)

add_warning

  public  add_warning(txt VARCHAR2, 
loc VARCHAR2,
proc VARCHAR2,
pck VARCHAR2,
sch VARCHAR2,
usr VARCHAR2,
err VARCHAR2,
dtime DATE)
Records an WARNING in the error logging table. NB: the level filter may prevent the record to be actually written. (values of variables, parameters etc)
Parameters:
txt - text containing the context of the situation (values of variables, parameters etc)
loc - location in code (denoted by some ID which is unique in the procedure/function)
proc - procedure or function name
pck - package name
sch - database schema name
usr - application user name (if NULL, USER will be written)
err - Error text
dtime - datetime (if NULL, sysdate is used)

add_trace

  public  add_trace(txt VARCHAR2, 
loc VARCHAR2,
proc VARCHAR2,
pck VARCHAR2,
sch VARCHAR2,
usr VARCHAR2,
err VARCHAR2,
dtime DATE)
Records an WARNING in the error logging table. NB: the level filter may prevent the record to be actually written. (values of variables, parameters etc)
Parameters:
txt - text containing the context of the situation (values of variables, parameters etc)
loc - location in code (denoted by some ID which is unique in the procedure/function)
proc - procedure or function name
pck - package name
sch - database schema name
usr - application user name (if NULL, USER will be written)
err - Error text
dtime - datetime (if NULL, sysdate is used)

add_record

  public  add_record(p_type VARCHAR2, 
txt VARCHAR2,
loc VARCHAR2,
proc VARCHAR2,
pck VARCHAR2,
sch VARCHAR2,
usr VARCHAR2,
err VARCHAR2,
dtime DATE)
Records an event in the error logging table. NB: the level filter may prevent the record to be actually written. (values of variables, parameters etc)
Parameters:
p_type - log type (E=error, W=warning, T=trace)
txt - text containing the context of the situation (values of variables, parameters etc)
loc - location in code (denoted by some ID which is unique in the procedure/function)
proc - procedure or function name
pck - package name
sch - database schema name
usr - application user name (if NULL, USER will be written)
err - Error text
dtime - datetime (if NULL, sysdate is used)

Flush

  public  Flush()
Saves pending logs into the log table

Show_Output

  public  Show_Output()
Shows pending logs on DBMS_OUTPUT, without erasing them

Clean

  public  Clean()
Clear pending logs

TheBigApp