zz$logger

From zzat
Jump to: navigation, search

zz$logger is a helper package to log zztat's activity. The central logging table is zz$log

The package has the following procedures and functions:

zz$logger package specification
Type Name Parameters Data Type Description
function get_call_stack Helper function to return the stack for errors. 12.1+ only, otherwise returns NULL. Called internally.
procedure init_tail Helper function to initialize the tail_f function. Called internally.
procedure log sev

facility#

module#

text

error#

number

number

number

varchar2

number

Main logger function. To make storage more efficient (we log a lot), severity, facility and module values are encoded.

The translation for those values is stored in zz$facility.

If error# > 0, the call stack is automatically logged.

Severity has the following mapping: 0=INFO, 1=WARN, 2=ERROR

procedure log sev

facility#

module#

text

number

number

number

CLOB

Overload to log large values. The LOB being passed is automatically split and stored as fragments in zz$log.
procedure log_query sev

facility#

module#

query

number

number

number

varchar2

Logs the output of queries. It's somewhat limited (the primary use is for the DEBUG process, to dump table contents and various diagnostics queries.
function tail_f delay number Helper function. Mimics Linux's "tail -f" command, but on a database table. Uses an application context to track rows that were already displayed.