LEHS - Log- and Exception-Handling System for ORACLE®
What is LEHS
LEHS means Log- and Exception-Handling System.
It is a system to maintain a database wide platform for user defined exceptions and
for application logging like the popular project LOG4J.
Why use LEHS
There are other projects out there achieving roughly the same.
For Instance:
So, why should you use LEHS then?
- LEHS integrates most features of all the other projects into one maintainable system.
- It has a simple security layer making it easy to maintain privileges simply from inside LEHS itself.
- It is also very easy to define new exception messages (also internationalized) and log topics.
Features of LEHS
- it can distinguish between seperate applications using the same DB schema.
Also, your application may maintain several separate Logs (like a technical log and a business log)
- configurable logging with as many detail steps as you like
- 6 configurable programmable log steps, making it easier for developers to use the logging capability (as used by LOG4J).
- unlimited definitions of exception messages to be maintained by the developers and the DBA
- Possibility to internationalize the exception messages.
Internationalized exception messages will be displayed in accordance to the territory of the user client (NLS_LANGUAGE
)
- Exception messages with up to 9 variable parts
- Easy to Use exception manager
- Exceptions will be protocolled with line number where it has been raised.
- Open a log transaction which can be used over several procedure calls. Since the key of a transaction
will be generated by a sequence you can use this transaction as a primary key by your application).
- Save an unlimited amount of text to a log transaction makeing it easier to find specific entries later on
- You can put your log messages into a free configurable log topics List, giving you the ability to sort your log messages hierarchically.
- The API is completly documented with pldoc.
Watch the API online
- Also included: A package to format any call of a stored procedure/function
New Features with Release 2.0
- Security follows now the ORACLE® recommendation of the least privilege.
- Open Appender Architecture instead of proprietary log destinations
- All existing log destinations (from Version 1.2 and 1.3) are now available as appenders
- Write your own appenders which can easily extend the possibilities of LEHS
(i.E. AQ-Appender, Mail-Appender, etc.)
- The Open Appender Architecture is simple to use (follow the LEHS Appender packages)
- extended API:
PKG_LEHS.handle_exception_and_log
, PKG_LEHS.log_exception
are now extended by all programmable log levels (e.g.:
PKG_LEHS.handle_exception_and_log_warn
,
PKG_LEHS.log_exception_debug
)
- added assertions by
PKG_LEHS.assert
(also with the ability of all programmable log levels like
PKG_LEHS.assert_warn
)
New Features with Release 2.1
- A new package
PKG_WRAPPED_LEHS
has been added to support wrappers written around the LEHS log engine.
For further information look at "A word about wrappers" in the documentation.
New Features with Release 2.2
- The Name of the Application can now be shown in the Prefix of a raised user named Exception (either by calling
PKG_LEHS.handle_exception
, PKG_LEHS.handle_exception_and_log
or by PKG_WRAPPED_LEHS.handle_exception_and_log
.
This can be controlled by a boolean Parameter on Application Level. (take a look on PKG_LEHS_SYSTEM.add_application
or PKG_LEHS_SYSTEM.change_application
)
- The Methods
PKG_LEHS.is_named_exception
and PKG_LEHS.get_last_exception_name
will now take care of the
Application Name within the raised Exception
Notes
LEHS is completely developed in PL/SQL. Therefor it only runs on ORACLE® databases.
Because LEHS uses the function DBMS_UTILITY.format_error_backtrace
it only runs on ORACLE® Database 10gR2 and above.
Contact me
In case of questions, enhancements, trouble shooting etc. please contact me by
.