Every PL/SQL application needs logging and a test framework, and a few other features like assertion, exception and collections.
This is an analsys of the existing frameworks.
APEX has the following debugging packages:
APEX_APPLICATION
- apex_application.g_debug - debug enabled flag
- apex_application.debug - procedure to log a debug message
APEX_DEBUG (previously called APEX_DEBUG_MESSAGE)
- message - general procedure, with p_level to set the level
- error - shortcut procedure to log an error
- warn - shortcut procedure
- info - shortcut procedure (used by apex_application.debug)
- trace - shortcut procedure to log below info level
- and others
Only alexandria-plsql-utils
(below) sends messages to the APEX logging layer.
(https://github.com/OraOpenSource/Logger)
This is the most common logging library. It uses a lot of objects in the schema. It doesnt appear to send logging events to APEX's debug functionality, but it does log APEX data in its own tables.
It includes assertion functionality, but not more generic exception functionality.
oos-utils
uses Logger in some of its components. https://github.com/OraOpenSource/oos-utils
Actively maintained.
Another large system.
debug_pkg only provides debug support
Includes APEX_APPLICATION.DEBUG support
Only uses dbms_output as a fallback; does not do any logging. No assertion or exception frameworks.
Moderately actively maintained.
A very large system, with a good build and test structure, with 'logger' being only a single component. It also has modules for user_messages, collections and exceptions and assertions.
Most components, including the logging component, have no dependencies
on other parts of plsql-core
.
Not actively maintained.
A very comprehensive logging framework, requiring many database objects to be installed.
No updates since 2013.
Includes logging (logs) and assertion (excp)
https://github.com/areuser/plsql-commons
Last update was 2013.
Previously the most commonly used logging package.
Last update was 2013.
Resulting in at least two forks on github: https://github.com/alangibson/log4plsql https://github.com/soliverr/log4plsql
Also not maintained.
Recommends using Logger.
Has logging examples, such as at_log.pkg, dbms_errlog_helper.pkg, etc.
Each .sql file has a single anonymous procedure with its own mini test library, inbuilt requiring no test library to be installed.
However some of the tests do depend on components of the framework.
assert
tests depends ontypes
packageevent_mediator
tests depends ontypes
packageproperties
tests depends onlogger
packagepermission
s tests depend onconstants
package
https://github.com/dba-diaries/plsql-chrestomathy
Interesting and growing collection of components aimed at DBAs more than application builders.