Results for “hri_debug_mode”
4 results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
HRI_UTIL is a shared utility package body owned by APPS and classified as a UTIL API within Oracle E-Business Suite. It provides foundational instrumentation, diagnostic, and file-handling services used across the HRI (Human Resources Intelligence) schema and related application modules. The package abstracts common logging and timing operations so that other PL/SQL units can emit consistent, structured diagnostic output to concurrent program log and output files without repeating boilerplate code.
A central feature is its profile-driven debug switch. During initialization the package evaluates the HRI_DEBUG_MODE profile option, and when set to Y it sets the global flag g_debug to TRUE. This flag governs whether DEBUG_LINE actually writes output, allowing verbose tracing to be enabled or disabled at runtime without code changes. The package also manages a configurable log directory through its initialization routine, resolving output destinations for the underlying FND_FILE utilities.
Key Procedures and Functions
- INITIALIZE — Establishes the package session state. It reads the HRI_DEBUG_MODE profile to set the global debug flag, records the calling object name, and configures the FND_FILE log and output file names, defaulting the directory to the BIS_DEBUG_LOG_DIRECTORY profile value when none is supplied.
- DEBUG_LINE — Writes a line of text to the log only when the debug flag is enabled, providing conditional tracing.
- PUT_LINE — Unconditional write of a text line to the log file; the base output primitive used by the other routines.
- PUT_TIMESTAMP — Prepends or appends a formatted date/time stamp to a supplied message.
- START_TIMER — Captures the starting point of an interval for performance measurement.
- STOP_TIMER — Closes the interval and computes elapsed duration.
- PRINT_TIMER — Emits the measured duration, formatted in days, hours, minutes, and seconds.
- GET_SCHEMA_NAME — Returns the current schema name.
- GET_APPS_SCHEMA_NAME — Returns the APPS schema name for use in dynamic SQL and object resolution.
- TRUNCATE_TABLE — Performs a DDL truncate against a specified table.
- DROP_TABLE — Performs a DDL drop against a specified table.
- GET_UTL_FILE_DIR — Returns the database UTL_FILE directory path values, typically derived from V$PARAMETER.
- WRITE_LOG — Writes diagnostic content to the log file.
- WRITE_OUTPUT — Writes content to the concurrent program output file.
Tables Accessed
The package references a small set of dictionary and configuration sources through APPS synonyms. FND_ORACLE_USERID is consulted to resolve Oracle user and schema mappings, supporting the schema-name utilities. V$PARAMETER is queried to obtain the utl_file_dir initialization parameter values, which back the GET_UTL_FILE_DIR function and inform valid log directory choices. No application transaction tables are updated directly; the DDL utilities operate on caller-supplied table names.
Usage Notes
HRI_UTIL is typically invoked from concurrent programs, PL/SQL batch processes, and other packaged code that requires consistent logging and timing. Callers generally invoke INITIALIZE first to set debug state and file targets, then bracket processing with START_TIMER, DEBUG_LINE, and STOP_TIMER/PRINT_TIMER to capture diagnostics and elapsed time. Because the ETRM metadata indicates the package is referenced by three other packages, it serves as a low-level dependency rather than an end-user-facing API. To enable verbose tracing, administrators set the HRI_DEBUG_MODE profile option to Y before running the consuming program.