Skip to content
j-siebenPublic

About

PL/SQL Instrumentation Toolkit

Topics

Resources

Stars

27 stars

Watchers

7 watching

Forks

Latest commit

 

History

630 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PIT — PL/SQL Instrumentation Toolkit

Hi everybody, this is the home of PIT, the PL/SQL Instrumentation Toolkit. It helps you manage exceptions, debug information, tracing, assertions and user messages through one PL/SQL API, with as little instrumentation code as possible.

Define your messages once, translate them when needed and let output modules deliver them to the console, tables, files, mail or APEX. Contexts control the amount of logging and tracing without changing your application code. Collection mode lets the same validation logic report several findings to a UI.

The code is free to use under the MIT licence. I hope you enjoy using it. If you find a problem, please describe it in an issue so it can be investigated.

Start here

A small example

After creating the message definitions and generating MSG, an instrumented procedure can look like this:

procedure process_order(p_order_id in number) as
begin
  pit.enter_mandatory(
    p_params => msg_params(msg_param('order_id', p_order_id)));
  -- Process the order here.
  pit.raise_info(msg.ORDER_PROCESSED, msg_args(p_order_id));
  pit.leave_mandatory;
exception
  when others then
    pit.handle_exception;
    raise;
end;

The handler logs the error and cleans up tracing; raise; passes the original exception to the caller. The handbook explains the alternatives, including validation handling and deliberate exception ignoring.

Documentation and source

The English Markdown handbook lives in DOC/obsidian; the generated Natural Docs API reference lives in DOC/api. See documentation maintenance for generation and validation commands.

Application code normally uses PIT. PIT_ADMIN maintains messages and settings; PARAM and PARAM_ADMIN provide the reusable parameter framework. The installer selects the regular or native-Boolean implementation for the database version. Optional output modules live under PIT/modules.

About

PL/SQL Instrumentation Toolkit

Topics

Resources

Stars

27 stars

Watchers

7 watching

Forks

Releases

Packages

Contributors

Languages