| LEHS - Log- and Exception Handling System for ORACLE | |||||
FRAMES NO FRAMES | ||||||
SUMMARY: FIELD | TYPE | METHOD | DETAIL: FIELD | TYPE | METHOD |
This Package is an Interface and a Utility Package for all Appenders.
In short Words: An Appender is a Package with at least a Procedure namedlog
with only 1 Parameter of Datatype
PKG_LEHS_APPENDER.pr_log_line
. But such Package can have
more than this one Procedure. Here's an Example of a possible
Package Specification of an Appender Package:
CREATE OR REPLACE PACKAGE a_appender_package IS -- This Procedure (with exactly this Signature) must be implemented -- to be recognized as a valid Appender Package PROCEDURE log ( pi_log_line IN PKG_LEHS_APPENDER.pr_log_line );These Procedures can be divided into two Categories:
-- This Procedure will be called when the Appender-Package will be -- registered to a Log-Application by PKG_LEHS_SYSTEM.register_appender PROCEDURE register ( pi_application IN PKG_LEHS_APPENDER.pst_application_name );
-- This Procedure will be called when the Appender-Package will be -- deregistered from a Log-Application by PKG_LEHS_SYSTEM.deregister_appender PROCEDURE deregister ( pi_application IN PKG_LEHS_APPENDER.pst_application_name );
-- This Procedure will be called when a Log-Appender Parameter will be -- added or changed by PKG_LEHS_SYSTEM.set_appender_parameter for -- Values of type CLOB PROCEDURE check_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_clob );
-- This Procedure will be called when a Log-Appender Parameter will be -- added or changed by PKG_LEHS_SYSTEM.set_appender_parameter for -- Values of type NUMBER PROCEDURE check_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_number );
-- This Procedure will be called when a Log-Appender Parameter will be -- added or changed by PKG_LEHS_SYSTEM.set_appender_parameter for -- Values of type DATE PROCEDURE check_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_date );
-- This Procedure will be called when a Log-Appender Parameter will be -- added or changed by PKG_LEHS_SYSTEM.set_appender_parameter for -- Values of type TIMESTAMP_UNCONSTRAINED PROCEDURE check_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_timestamp );
-- This Procedure will be called when a Log-Appender Parameter will be -- added or changed by PKG_LEHS_SYSTEM.set_appender_parameter for -- Values of type DSINTERVAL_UNCONSTRAINED PROCEDURE check_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_interval_ds );
-- This Procedure will be called when a Log-Appender Parameter will be -- added or changed by PKG_LEHS_SYSTEM.set_appender_parameter for -- Values of type YMINTERVAL_UNCONSTRAINED PROCEDURE check_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_interval_ym );
-- This Procedure will be first called when the Appender-Package will -- be initialized to the given Log-Application PROCEDURE initialize ( pi_application IN PKG_LEHS_APPENDER.pst_application_name );
-- Sets the given Parameter at Runtime just before the first Usage -- of this Package for a Datatype CLOB PROCEDURE set_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_clob );
-- Sets the given Parameter at Runtime just before the first Usage -- of this Package for a Datatype NUMBER PROCEDURE set_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_number );
-- Sets the given Parameter at Runtime just before the first Usage -- of this Package for a Datatype DATE PROCEDURE set_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_date );
-- Sets the given Parameter at Runtime just before the first Usage -- of this Package for a Datatype TIMESTAMP PROCEDURE set_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_timestamp );
-- Sets the given Parameter at Runtime just before the first Usage -- of this Package for a Datatype INTERVAL DAY TO SECOND PROCEDURE set_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_interval_ds );
-- Sets the given Parameter at Runtime just before the first Usage -- of this Package for a Datatype INTERVAL YEAR TO MONTH PROCEDURE set_param ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_key IN PKG_LEHS_APPENDER.pst_parameter_name ,pi_value IN PKG_LEHS_APPENDER.pst_param_value_interval_ym );
-- Will be called after all setter has been called PROCEDURE after_initialize_check ( pi_application IN PKG_LEHS_APPENDER.pst_application_name );
-- Will be called, when the Log-Application will be removed from memory PROCEDURE cleanup ( pi_application IN PKG_LEHS_APPENDER.pst_application_name );
-- When PKG_LEHS.start_log_transaction will be called this Procedure -- will be called for every registered Appender PROCEDURE start_log_transaction ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_transaction IN BINARY_INTEGER );
-- When PKG_LEHS.end_log_transaction will be called this Procedure -- will be called for every registered Appender PROCEDURE end_log_transaction ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_transaction IN BINARY_INTEGER );
-- Adds a Transaction Key with the Datatype CLOB -- Will be called by PKG_LEHS.add_transaction_key for every -- registered Appender PROCEDURE add_transaction_key ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_transaction IN BINARY_INTEGER ,pi_key IN VARCHAR2 ,pi_value IN CLOB );
-- Adds a Transaction Key with the Datatype NUMBER -- Will be called by PKG_LEHS.add_transaction_key for every -- registered Appender PROCEDURE add_transaction_key ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_transaction IN BINARY_INTEGER ,pi_key IN VARCHAR2 ,pi_value IN NUMBER );
-- Adds a Transaction Key with the Datatype DATE -- Will be called by PKG_LEHS.add_transaction_key for every -- registered Appender PROCEDURE add_transaction_key ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_transaction IN BINARY_INTEGER ,pi_key IN VARCHAR2 ,pi_value IN DATE );
-- Adds a Transaction Key with the Datatype TIMESTAMP -- Will be called by PKG_LEHS.add_transaction_key for every -- registered Appender PROCEDURE add_transaction_key ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_transaction IN BINARY_INTEGER ,pi_key IN VARCHAR2 ,pi_value IN TIMESTAMP_UNCONSTRAINED );
-- Adds a Transaction Key with the Datatype INTERVAL DAY TO SECOND -- Will be called by PKG_LEHS.add_transaction_key for every -- registered Appender PROCEDURE add_transaction_key ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_transaction IN BINARY_INTEGER ,pi_key IN VARCHAR2 ,pi_value IN DSINTERVAL_UNCONSTRAINED );
-- Adds a Transaction Key with the Datatype INTERVAL YEAR TO MONTH -- Will be called by PKG_LEHS.add_transaction_key for every -- registered Appender PROCEDURE add_transaction_key ( pi_application IN PKG_LEHS_APPENDER.pst_application_name ,pi_transaction IN BINARY_INTEGER ,pi_key IN VARCHAR2 ,pi_value IN YMINTERVAL_UNCONSTRAINED ); END a_appender_package;
PKG_LEHS_SYSTEM.register_appender
you can register
an Appender Package to an existing Log-Application. If you provide a Procedure
named register
with only a Parameter of Datatype
PKG_LEHS_APPENDER.pst_application_name
then this Procedure
will be called just before this Appender will be registered to the
Log-Application. The Log-Application, where the Appender will be registered
to will be the Value of this Parameter.
deregister
with only a
Parameter of Datatype PKG_LEHS_APPENDER.pst_application_name
then this Procedure will be called when deregistering this Appender from
an existing Log-Application. The Log-Application, where the Appender will
be deregistered from will be the Value of this Parameter.
Be aware that every Exception you deregister Procedure raises will be caught
and logged to the Log-Application LEHS
but this doesn't
avoid your Appender to be deregistered from the given Log-Application.
PKG_LEHS_SYSTEM.set_appender_parameter
.
Because LEHS doesn't even know anything about the correct Parameters
of a Log-Application it delegates the checking of the Parameters to
the Appender itself. If the Appender doesn't provide a Checker Procedure
to the Datatype of the Parameter to be set then LEHS expects, that this
Parameter must be saved without any checkings.
A Parameter of an Appender is simply a Name=Value Pair. Following this
Principle the Tasks of a Checker are the following:
PKG_LEHS_APPENDER.raise_invalid_parameter_name
to raise
a standardized Exception if the Name of the Parameter is invalid
PKG_LEHS_APPENDER.raise_invalid_parameter_name
to raise
a standardized Exception if the Datatype of the Parameter is invalid.
PKG_LEHS_APPENDER.assert_parameter_value
.
If the Assertion fails then a standardized Exception Message will
be raised. The Value of the Parameter pi_error_message
will be appended to this standardized Exception Message (to set a
clearer Description why the checking has been failed).
PKG_LEHS_SYSTEM.set_appender_parameter
. The raised
Exception will be logged and looped through the Caller of the Procedure
PKG_LEHS_SYSTEM.set_appender_parameter
.
Timestamp of Call | Procedures |
---|---|
First Call of any Procedure of Package PKG_LEHS |
|
Every Call of any of these Procedures:
|
log |
Every Call of the Procedures PKG_LEHS.start_log_transaction
|
start_log_transaction |
Every Call of the Procedures PKG_LEHS.add_transaction_key
|
add_transaction_key |
Every Call of the Procedures PKG_LEHS.end_log_transaction
|
end_log_transaction |
initialize
, set_param
or
check_after_initialize
) or the requested Action will not be
executed correctly (either because the Procedure log
has
raised an Exception or one of the Procedures start_log_transaction
,
end_log_transaction
or add_transaction_key
raised
an Exception).
PKG_LEHS.resync
, every initialized Appender will
be removed from the internal Buffer. When an Appender will be removed from
the internal Buffer, the Procedure cleanup
will be called (if
this Procedure is implemented).
The only allowed Parameter is of Datatype
PKG_LEHS_APPENDER.pst_application_name
. The Value of this
Parameter is the Name of the Log-Application, the Package has been
registered to and will be cleaned up.
The Procedure cleanup
is used, to clean up the internal
Memory Structures of the Appender, which has been set by the Initialization
or during the Runtime.
This Procedure will also be called, if the Application will be resynced
because any Setting of the Log-Application has been changed.
PKG_LEHS_APPENDER.pst_application_name
or by the Record-Structure PKG_LEHS_APPENDER.pr_log_line
for the Procedure log
).
The best Way to do this is an internal PL/SQL associative Array (indexed by
the Datatype PKG_LEHS_APPENDER.pst_application_name
). This is
the Reason for exactly the Procedure initialize
, to initialize
this internally used Memory-Structure.
PKG_LEHS_SYSTEM.set_appender_parameter
) will
be given to the Appender Package at the Initialization by the Procedure
set_param
. This Procedure must have at least 3 Parameters:
PKG_LEHS_APPENDER.pst_application_name
,
which sets the Name of the Log-Application as its Value
PKG_LEHS_APPENDER.pst_parameter_name
,
which sets the Name of the Appender Parameter as its Value
PKG_LEHS_APPENDER.pst_param_value_clob
CLOB
PKG_LEHS_APPENDER.pst_param_value_number
NUMBER
PKG_LEHS_APPENDER.pst_param_value_date
DATE
PKG_LEHS_APPENDER.pst_param_value_timestamp
TIMESTAMP
PKG_LEHS_APPENDER.pst_param_value_interval_ds
INTERVAL DAY TO SECOND
PKG_LEHS_APPENDER.pst_param_value_interval_ym
INTERVAL YEAR TO MONTH
check_param
)
PKG_LEHS_APPENDER.pst_application_name
. Here's an Example,
how this internal Structure can be used:
CREATE OR REPLACE PACKAGE a_appender_package IS pc_param_retention_time CONSTANT PKG_LEHS_APPENDER.pst_parameter_name := 'RETENTION TIME'; pc_param_trx_timeout CONSTANT PKG_LEHS_APPENDER.pst_parameter_name := 'TRANSACTION TIMEOUT'; -- several other Procedures (incl. log) would follow here END a_appender_package;
CREATE OR REPLACE PACKAGE BODY a_appender_package IS TYPE pr_values IS RECORD ( retention_time PKG_LEHS_APPENDER.pst_param_value_number ,trx_timeout PKG_LEHS_APPENDER.pst_param_value_number ); TYPE pt_values IS TABLE OF pr_values INDEX BY PKG_LEHS_APPENDER.pst_application_name; pv_values PT_VALUES; -- several other Procedure Implementations (incl. log) would follow here END a_appender_package;
after_initialize_check
. When
for some Reason, a mandatory Parameter has not been set (because it has
been forgotten), then this Procedure has to check this and raises an
Exception if mandatory Parameters are not set. This Exception would lead
to an uninitialized Appender, which itself would cause a Log-Entry to the
internal Log-Application LEHS and the Appender would not be recognized
during the Runtime of the Application.
log
. Every
Log-Entry will be made by calling the Procedure log
of every
registered and successfully initialized Appender. Therefor, the Procedure
log
is of course the only real mandatory Procedure of an
Appender Package.
The Procedure log
has only one Parameter of the Datatype
PKG_LEHS_APPENDER.pr_log_line
, which in fact includes all
Information to make the Log-Entry. If you look at the Table above, you can
see, that several Procedures of the Package PKG_LEHS
would lead
to a Call of the Procedure log
(including several Exception
Handling Routines). So it is really vital, that this Procedure handles the
Log-Entry very fast and doesn't really lead to expensive Exceptions.
If the Procedure log
raises an Exception, this Exception would
itself be logged to the Log-Application LEHS. If, for any Instance, there
is also a misconfiguration at any Appender of the Log-Application LEHS, this
would lead to a Log-Entry of the Session Trace File (this is the last sheet
anchor for the Application itself, that this very fatal Exception has been
logged anywhere).
PKG_LEHS.start_log_transaction
. LEHS creates
a unique Transaction ID which it will provide the optional Procedure
start_log_transaction
for every registered and successfully
initialized Appender.
PKG_LEHS.start_log_transaction
.
Like check_param
or set_param
the Keywords can
be of several Datatypes (CLOB
, NUMBER
, DATE
,
TIMESTAMP
, INTERVAL DAY TO SECOND
or
INTERVAL YEAR TO MONTH
. Look at the Package
PKG_LEHS
to find the various
Implementations of add_transaction_key
(the Procedure
add_transaction_key
with the Value Datatype VARCHAR2
results in a Transaction Key with the Datatype CLOB
).
PKG_LEHS.start_log_transaction
the generated Transaction ID will be provided for every Log-Entry until
you end the Log-Transaction by calling PKG_LEHS.end_log_transaction
.
For every registered and successfully initialized Appender the optional
Procedure end_log_transaction
will be called, if you end an
active Log-Transaction by PKG_LEHS.end_log_transaction
.
Field Summary | |
VARCHAR2(30) | pc_default_log_format
Default Log-Format: %d [%a:%T:%p] %M[TX=%t]: %m
|
VARCHAR2(250) | pc_default_log_time_format
Default Log-Time Format: FMDD.MMFM.RRRR FMHH24FM:MI:SS:FF6
|
VARCHAR2(30) | pc_packname
Name of the Package |
VARCHAR2(30) | pc_type_app_name
Name of the Datatype for the Application Name: PST_APPLICATION_NAME
|
VARCHAR2(30) | pc_type_log_line
Name of the Log Record: PR_LOG_LINE
|
Type Summary | |
RECORD | pr_app_parameters(appender_name LEHS_APPENDER.appender_name%TYPE, max_log_level LEHS_APPENDER.max_log_level%TYPE, log_levels PT_LOG_LEVELS, parameters PT_PARAMETERS)
All neccessary Information to a specific Appender |
RECORD | pr_caller(owner VARCHAR2(30), method VARCHAR2(30), line# BINARY_INTEGER)
Where has the Call been made |
RECORD | pr_log_line(application PKG_LEHS.pst_application_name, log_time TIMESTAMP_UNCONSTRAINED, log_level LEHS_LOG_LEVELS.log_level%TYPE, log_topic LEHS_TOPICS.topic_name%TYPE, log_transaction PKG_LEHS.pst_log_transaction, log_caller pr_caller, log_message CLOB)
Representation of one Log-Entry |
RECORD | pr_parameter(datatype LEHS_APPENDER_PARAMETERS.datatype%TYPE, value_clob PST_PARAM_VALUE_CLOB, value_number PST_PARAM_VALUE_NUMBER, value_date PST_PARAM_VALUE_DATE, value_timestamp PST_PARAM_VALUE_TIMESTAMP, value_interval_day_to_second PST_PARAM_VALUE_INTERVAL_DS, value_interval_year_to_month PST_PARAM_VALUE_INTERVAL_YM)
Representation of the Value of one Appender Parameter |
PKG_LEHS.pst_application_name | pst_application_name()
Datatype of the Application Name |
LEHS_APPENDER_PARAMETERS.value_clob%TYPE | pst_param_value_clob()
Datatype of a CLOB -Parameter
|
LEHS_APPENDER_PARAMETERS.value_date%TYPE | pst_param_value_date()
Datatype of a DATE -Parameter
|
LEHS_APPENDER_PARAMETERS.value_interval_day_to_second%TYPE | pst_param_value_interval_ds()
Datatype of an INTERVAL DAY TO SECOND -Parameter
|
LEHS_APPENDER_PARAMETERS.value_interval_year_to_month%TYPE | pst_param_value_interval_ym()
Datatype of an INTERVAL YEAR TO MONTH -Parameter
|
LEHS_APPENDER_PARAMETERS.value_number%TYPE | pst_param_value_number()
Datatype of a NUMBER -Parameter
|
LEHS_APPENDER_PARAMETERS.value_timestamp%TYPE | pst_param_value_timestamp()
Datatype of a TIMESTAMP -Parameter
|
LEHS_APPENDER_PARAMETERS.parameter%TYPE | pst_parameter_name()
Datatype of the Parameter Name (Key) |
TABLE OF pr_app_parameters INDEX BY pst_application_name | pt_app_parameters()
List of neccessary Appender Information |
TABLE OF BINARY_INTEGER INDEX BY LEHS_LOG_LEVELS.log_level%TYPE | pt_log_levels()
List of valid Log-Levels |
TABLE OF pr_parameter INDEX BY pst_parameter_name | pt_parameters()
List of Appender Parameters |
Method Summary | |
| assert_parameter_value(pi_assertion BOOLEAN, pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_clob, pi_error_message CLOB DEFAULT NULL)
If the Assertion fails then a standardized Exception will be thrown. |
| assert_parameter_value(pi_assertion BOOLEAN, pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_number, pi_error_message CLOB DEFAULT NULL)
If the Assertion fails then a standardized Exception will be thrown. |
| assert_parameter_value(pi_assertion BOOLEAN, pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_date, pi_error_message CLOB DEFAULT NULL)
If the Assertion fails then a standardized Exception will be thrown. |
| assert_parameter_value(pi_assertion BOOLEAN, pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_timestamp, pi_error_message CLOB DEFAULT NULL)
If the Assertion fails then a standardized Exception will be thrown. |
| assert_parameter_value(pi_assertion BOOLEAN, pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_interval_ds, pi_error_message CLOB DEFAULT NULL)
If the Assertion fails then a standardized Exception will be thrown. |
| assert_parameter_value(pi_assertion BOOLEAN, pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_interval_ym, pi_error_message CLOB DEFAULT NULL)
If the Assertion fails then a standardized Exception will be thrown. |
CLOB | format_log_message(pi_log_line pr_log_line, pi_format pst_param_value_clob DEFAULT pc_default_log_format)
Formats a given Log-Line by the specified Format. |
pt_app_parameters | get_appender_parameters()
Get all neccessary Information for all registered Appenders, where the calling Package has been registered to. |
| raise_invalid_parameter_name(pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_clob)
Raises the standardized Exception for any Parameter Error. |
| raise_invalid_parameter_name(pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_number)
Raises the standardized Exception for any Parameter Error. |
| raise_invalid_parameter_name(pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_date)
Raises the standardized Exception for any Parameter Error. |
| raise_invalid_parameter_name(pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_timestamp)
Raises the standardized Exception for any Parameter Error. |
| raise_invalid_parameter_name(pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_interval_ds)
Raises the standardized Exception for any Parameter Error. |
| raise_invalid_parameter_name(pi_parameter_name pst_parameter_name, pi_parameter_value pst_param_value_interval_ym)
Raises the standardized Exception for any Parameter Error. |
Field Detail |
public VARCHAR2(30) pc_packname
public VARCHAR2(30) pc_default_log_format
%d [%a:%T:%p] %M[TX=%t]: %m
public VARCHAR2(250) pc_default_log_time_format
FMDD.MMFM.RRRR FMHH24FM:MI:SS:FF6
public VARCHAR2(30) pc_type_log_line
PR_LOG_LINE
public VARCHAR2(30) pc_type_app_name
PST_APPLICATION_NAME
Type Detail |
public PKG_LEHS.pst_application_name pst_application_name()
public LEHS_APPENDER_PARAMETERS.parameter%TYPE pst_parameter_name()
public LEHS_APPENDER_PARAMETERS.value_clob%TYPE pst_param_value_clob()
CLOB
-Parameter
public LEHS_APPENDER_PARAMETERS.value_number%TYPE pst_param_value_number()
NUMBER
-Parameter
public LEHS_APPENDER_PARAMETERS.value_date%TYPE pst_param_value_date()
DATE
-Parameter
public LEHS_APPENDER_PARAMETERS.value_timestamp%TYPE pst_param_value_timestamp()
TIMESTAMP
-Parameter
public LEHS_APPENDER_PARAMETERS.value_interval_day_to_second%TYPE pst_param_value_interval_ds()
INTERVAL DAY TO SECOND
-Parameter
public LEHS_APPENDER_PARAMETERS.value_interval_year_to_month%TYPE pst_param_value_interval_ym()
INTERVAL YEAR TO MONTH
-Parameter
public RECORD pr_parameter(datatype LEHS_APPENDER_PARAMETERS.datatype%TYPE,
value_clob PST_PARAM_VALUE_CLOB,
value_number PST_PARAM_VALUE_NUMBER,
value_date PST_PARAM_VALUE_DATE,
value_timestamp PST_PARAM_VALUE_TIMESTAMP,
value_interval_day_to_second PST_PARAM_VALUE_INTERVAL_DS,
value_interval_year_to_month PST_PARAM_VALUE_INTERVAL_YM)
public TABLE OF pr_parameter INDEX BY pst_parameter_name pt_parameters()
public TABLE OF BINARY_INTEGER INDEX BY LEHS_LOG_LEVELS.log_level%TYPE pt_log_levels()
public RECORD pr_app_parameters(appender_name LEHS_APPENDER.appender_name%TYPE,
max_log_level LEHS_APPENDER.max_log_level%TYPE,
log_levels PT_LOG_LEVELS,
parameters PT_PARAMETERS)
public TABLE OF pr_app_parameters INDEX BY pst_application_name pt_app_parameters()
public RECORD pr_caller(owner VARCHAR2(30),
method VARCHAR2(30),
line# BINARY_INTEGER)
public RECORD pr_log_line(application PKG_LEHS.pst_application_name,
log_time TIMESTAMP_UNCONSTRAINED,
log_level LEHS_LOG_LEVELS.log_level%TYPE,
log_topic LEHS_TOPICS.topic_name%TYPE,
log_transaction PKG_LEHS.pst_log_transaction,
log_caller pr_caller,
log_message CLOB)
Method Detail |
public CLOB format_log_message(pi_log_line pr_log_line,
pi_format pst_param_value_clob DEFAULT pc_default_log_format)
%a
... Name of the Log-Application%d[opt. Format]
... Log-Time with an optional FormatFMDD.MMFM.RRRR FMHH24FM:MI:SS:FF6
will be taken%M
... The producing Method%p
... The used Log-Level%T
... The Log-Topic%t
... The Log-Transaction%m
... The Log-Message%%
... %-Sign%d [%a:%T:%p] %M[TX=%t]: %m
pi_log_line
-
Log-Line to be formattedpi_format
-
Format of the Log-Linepublic pt_app_parameters get_appender_parameters()
PKG_APPENDER_PACKAGE
and you call
this Procedure from within this Package, you would get the Information,
where the Package PKG_APPENDER_PACKAGE
has been used and
which Parameter has been set to by LEHS.
This Information can be useful if you have an offline Procedure, which
will be called asynchronous (within any other Session) and the Parameters
for this asynchronous Procedure itself will be managed by the Appender
Parameters. (Look at
PKG_LEHS_TABLE_APPENDER.cleanup
.
If the calling Package has not been registered as an Appender to any
Log-Application then an empty PL/SQL associative Array will be returned.
public raise_invalid_parameter_name(pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_clob)
pi_parameter_name
-
Name of the invalid Parameterpi_parameter_value
-
Value of the ParameterORA-20009
-
[INVALID APPENDER PARAMETER NAME] Invalid Parameter
Name or Datatype of this Parameter is invalidpublic raise_invalid_parameter_name(pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_number)
pi_parameter_name
-
Name of the invalid Parameterpi_parameter_value
-
Value of the ParameterORA-20009
-
[INVALID APPENDER PARAMETER NAME] Invalid Parameter
Name or Datatype of this Parameter is invalidpublic raise_invalid_parameter_name(pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_date)
pi_parameter_name
-
Name of the invalid Parameterpi_parameter_value
-
Value of the ParameterORA-20009
-
[INVALID APPENDER PARAMETER NAME] Invalid Parameter
Name or Datatype of this Parameter is invalidpublic raise_invalid_parameter_name(pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_timestamp)
pi_parameter_name
-
Name of the invalid Parameterpi_parameter_value
-
Value of the ParameterORA-20009
-
[INVALID APPENDER PARAMETER NAME] Invalid Parameter
Name or Datatype of this Parameter is invalidpublic raise_invalid_parameter_name(pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_interval_ds)
pi_parameter_name
-
Name of the invalid Parameterpi_parameter_value
-
Value of the ParameterORA-20009
-
[INVALID APPENDER PARAMETER NAME] Invalid Parameter
Name or Datatype of this Parameter is invalidpublic raise_invalid_parameter_name(pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_interval_ym)
pi_parameter_name
-
Name of the invalid Parameterpi_parameter_value
-
Value of the ParameterORA-20009
-
[INVALID APPENDER PARAMETER NAME] Invalid Parameter
Name or Datatype of this Parameter is invalidpublic assert_parameter_value(pi_assertion BOOLEAN,
pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_clob,
pi_error_message CLOB DEFAULT NULL)
pi_assertion
-
the Assertion, which will be checkedpi_parameter_name
-
Name of the Parameter, whose Value will be checkedpi_parameter_value
-
Value of the Parameter, which will be checked
by the given Assertionpi_error_message
-
Additional Error Message (will be appended to
the standardized Exception Message)ORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITHOUT REASON]
The Assertion of the Parameter Value has been failed
without any extended ReasonORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITH REASON]
The Assertion of the Parameter Value has been failed
with an extended Reasonpublic assert_parameter_value(pi_assertion BOOLEAN,
pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_number,
pi_error_message CLOB DEFAULT NULL)
pi_assertion
-
the Assertion, which will be checkedpi_parameter_name
-
Name of the Parameter, whose Value will be checkedpi_parameter_value
-
Value of the Parameter, which will be checked
by the given Assertionpi_error_message
-
Additional Error Message (will be appended to
the standardized Exception Message)ORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITHOUT REASON]
The Assertion of the Parameter Value has been failed
without any extended ReasonORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITH REASON]
The Assertion of the Parameter Value has been failed
with an extended Reasonpublic assert_parameter_value(pi_assertion BOOLEAN,
pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_date,
pi_error_message CLOB DEFAULT NULL)
pi_assertion
-
the Assertion, which will be checkedpi_parameter_name
-
Name of the Parameter, whose Value will be checkedpi_parameter_value
-
Value of the Parameter, which will be checked
by the given Assertionpi_error_message
-
Additional Error Message (will be appended to
the standardized Exception Message)ORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITHOUT REASON]
The Assertion of the Parameter Value has been failed
without any extended ReasonORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITH REASON]
The Assertion of the Parameter Value has been failed
with an extended Reasonpublic assert_parameter_value(pi_assertion BOOLEAN,
pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_timestamp,
pi_error_message CLOB DEFAULT NULL)
pi_assertion
-
the Assertion, which will be checkedpi_parameter_name
-
Name of the Parameter, whose Value will be checkedpi_parameter_value
-
Value of the Parameter, which will be checked
by the given Assertionpi_error_message
-
Additional Error Message (will be appended to
the standardized Exception Message)ORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITHOUT REASON]
The Assertion of the Parameter Value has been failed
without any extended ReasonORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITH REASON]
The Assertion of the Parameter Value has been failed
with an extended Reasonpublic assert_parameter_value(pi_assertion BOOLEAN,
pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_interval_ds,
pi_error_message CLOB DEFAULT NULL)
pi_assertion
-
the Assertion, which will be checkedpi_parameter_name
-
Name of the Parameter, whose Value will be checkedpi_parameter_value
-
Value of the Parameter, which will be checked
by the given Assertionpi_error_message
-
Additional Error Message (will be appended to
the standardized Exception Message)ORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITHOUT REASON]
The Assertion of the Parameter Value has been failed
without any extended ReasonORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITH REASON]
The Assertion of the Parameter Value has been failed
with an extended Reasonpublic assert_parameter_value(pi_assertion BOOLEAN,
pi_parameter_name pst_parameter_name,
pi_parameter_value pst_param_value_interval_ym,
pi_error_message CLOB DEFAULT NULL)
pi_assertion
-
the Assertion, which will be checkedpi_parameter_name
-
Name of the Parameter, whose Value will be checkedpi_parameter_value
-
Value of the Parameter, which will be checked
by the given Assertionpi_error_message
-
Additional Error Message (will be appended to
the standardized Exception Message)ORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITHOUT REASON]
The Assertion of the Parameter Value has been failed
without any extended ReasonORA-20009
-
[FAILED ASSERTION FOR APPENDER PARAMETER WITH REASON]
The Assertion of the Parameter Value has been failed
with an extended Reason
| LEHS - Log- and Exception Handling System for ORACLE | |||||
FRAMES NO FRAMES | ||||||
SUMMARY: FIELD | TYPE | METHOD | DETAIL: FIELD | TYPE | METHOD |