Search Results log_unexpected_error
Overview
JTF_DEBUG_PUB is a public PL/SQL package in the APPS schema that provides a centralized debugging and diagnostic logging framework for Oracle E-Business Suite. Its business function is to give developers and support personnel a consistent, reusable mechanism for instrumenting PL/SQL code without writing bespoke logging logic in every program unit. The package exposes utility formatters, session context management, and a family of logging entry points that route messages into the standard EBS logging infrastructure. Within the 12.1.1 and 12.2.2 code lines the package is classified as a PUBLIC API and is referenced by at least fifteen other packages, reflecting its role as common infrastructure rather than application-specific logic.
The package body also carries the module-level variable G_ICX_SESSION_ID, a NUMBER defaulted to NULL, declared alongside the package name constant G_PKG_NAME. This variable holds the current ICX session identifier so that log entries can be correlated to the user's runtime session. The user search term "g_icx_session_id" refers directly to this global variable, which is populated and read through the package's session-management and logging interfaces.
Key Procedures and Functions
The documented interface comprises twenty-two procedures and functions, grouped into formatting utilities, session control, and logging services.
- Formatting utilities: FORMATNUMBER, FORMATDATE, FORMATCHAR, FORMATBOOLEAN, FORMATINDENT, and FORMATSEPERATOR render values into aligned, human-readable log text. Each formatter pads a parameter name and encloses the value, producing uniform output suitable for reading in a log file or query result.
- GETVERSION returns the file header string, allowing callers to identify the exact package version in use.
- SET_ICX_SESSION_ID assigns the current session identifier to the internal G_ICX_SESSION_ID variable, establishing the correlation key used by subsequent log writes.
- DEBUG is the primary general-purpose logging entry point. LOG_DEBUG, LOG_ENTERING_METHOD, LOG_EXITING_METHOD, LOG_UNEXPECTED_ERROR, LOG_PARAMETERS, LOG_EXCEPTION, LOG_EVENT, and LOG_STATEMENT provide specialised wrappers for common instrumentation patterns: method tracing, parameter dumps, exception capture, event recording, and ad hoc statement tracing.
- IS_LOG_PARAMETERS_ON reports whether parameter logging has been enabled, letting callers avoid the overhead of building format strings when logging is disabled.
- HANDLE_EXCEPTIONS provides a standardised exception handler that records error detail and re-raises where appropriate.
- GET_MESSAGES retrieves accumulated message text for reporting or display.
Tables Accessed
The package interacts with the following objects through APPS synonyms.
- FND_LOG_MESSAGES — the principal destination for logged diagnostic output.
- FND_NEW_MESSAGES — accessed for message resolution and retrieval.
- JTF_DEBUG_S — the debug control sequence/settings source consulted to determine whether logging is enabled.
- DBMS_TRANSACTION, DBMS_UTILITY, DUAL, UTL_FILE — supplied packaged utilities used for transaction context, call stack inspection, single-row evaluation, and optional file output.
- V$PARAMETER — read to inspect database initialisation settings relevant to logging behaviour.
- PLITBLM — internal PL/SQL table used for buffering message collections.
Usage Notes
JTF_DEBUG_PUB is normally invoked implicitly rather than directly: application packages call the LOG_* procedures to emit trace information during forms execution, concurrent program runs, and online transactions. Developers instrumenting custom code call SET_ICX_SESSION_ID once per session and then use DEBUG or the specialised LOG_* procedures, guarding expensive formatting with IS_LOG_PARAMETERS_ON. Because the package is PUBLIC and referenced by many dependent packages, changes must preserve existing signatures. Logging behaviour is governed by the JTF_DEBUG_S settings, so enabling or disabling output is a configuration action rather than a code change.