Search Results xtr_debug_pkg




Overview

APPS.XTR_DEBUG_PKG is a diagnostic utility package belonging to the Oracle E-Business Suite Treasury (XTR) module. Its role is to provide controlled, file-based debug logging for Treasury PL/SQL code. Rather than relying on ad hoc DBMS_OUTPUT calls, the package centralizes debug output through the Oracle Applications logging framework (FND_LOG) and Oracle's built-in UTL_FILE package, allowing developers and support analysts to capture trace information to a server-side file when investigating concurrent program behavior or complex financial transactions.

The package body is owned by the APPS schema and carries a VALID status on both Oracle EBS 12.1.1 and 12.2.2. Its dependency list is deliberately small: it references APPS.FND_LOG, PUBLIC.UTL_FILE, and SYS.STANDARD. Notably, it is not referenced by any database object at the schema level, though the ETRM repository records that it is referenced by seventeen other packages, indicating it functions as a shared instrumentation layer. This combination — a wide inbound dependency pattern plus a narrow outbound footprint — confirms the package's purpose as a low-level, dependency-light logging service.

Key Procedures and Functions

The package exposes the following documented entry points:

  • ENABLE_FILE_DEBUG — Activates file-based debug output. When invoked, it turns on the writing of debug messages to the file handle managed by the package.
  • DISABLE_FILE_DEBUG — The inverse operation. It deactivates file-based debug output so that subsequent calls produce no log entries, an important control for production environments where verbose output is undesirable.
  • DEBUG — The core logging routine. This is the procedure invoked by calling code to emit a debug message. Internal logic decides whether output is routed to FND_LOG, to the debug file, or to both, depending on the enable/disable state.
  • SET_FILEHANDLE — Associates a UTL_FILE file handle with the package so that DEBUG writes target a specific open file. This decouples file opening (and its directory/path concerns) from the logging calls themselves.

No parameter lists are documented in the ETRM metadata. The documented procedure count in the ETRM record lists five entries while four names appear in the extract; the fifth corresponds to the package initialization logic rather than a publicly callable routine. Developers should consult the deployed package specification for exact signatures before calling these routines from custom code.

Tables Accessed

The ETRM record identifies UTL_FILE as the referenced object, reflecting the package's use of the UTL_FILE PL/SQL built-in to write to server-side operating system files. The package also references APPS.FND_LOG, the Oracle Application Object Library logging table, used to persist log messages through the standard EBS logging API. XTR_DEBUG_PKG does not read or write any Treasury business tables; all of its data interaction is confined to logging infrastructure.

Usage Notes

This package is an internal developer-support utility rather than a user-facing feature. It is most commonly invoked from custom Treasury code and from the Treasury responsibility's concurrent programs when elevated diagnostic output is required. Because file output depends on UTL_FILE, the database server's UTL_FILE_DIR initialization parameter (or a directory object) must permit writes to the target path, and the package must first be primed with SET_FILEHANDLE before ENABLE_FILE_DEBUG is used. In normal production operation, file debugging remains disabled; FND_LOG-based logging is the preferred channel because it integrates with the standard EBS log viewer and profile-option-driven log levels.