Search Results check_log_enabled
Overview
OKL_DEBUG_PUB is the public debugging and diagnostics utility package for the Oracle Lease Management (OKL) product family in Oracle E-Business Suite 12.1.1 and 12.2.2. Its purpose is to provide a controlled mechanism through which lease management code can emit diagnostic trace messages to a server-side file and, in its later revisions, to the standard Oracle Applications logging framework (FND_LOG). The package is declared AUTHID CURRENT_USER and is classified as a public API under the APPS schema, meaning it is intended to be referenced by other application code rather than executed directly by end users.
The core design principle is profile-driven verbosity. The global variable G_Debug_Level is initialized from the OKL_DEBUG_LEVEL profile option, and the output directory G_DIR is initialized from the UTL_FILE_DIR profile option. Diagnostic output is therefore suppressed by default and only produced when a system administrator deliberately raises the profile level for a targeted troubleshooting exercise.
Key Procedures and Functions
- OPENFILE — Opens a debug output file. If a file name is supplied it is opened; otherwise a new file is created. This establishes the file handle used by subsequent logging calls.
- LOGMESSAGE — Writes a debugging message to the output file. The message is emitted only when the supplied debug level exceeds the currently effective
G_Debug_Level. It optionally prefixes the message with a timestamp. - SETDEBUGLEVEL — Sets
G_Debug_Levelprogrammatically. This is required when the package is executed outside the normal applications context, where the profile option cannot be resolved. - SETDEBUGFILEDIR — Overrides the debug output directory, allowing callers to redirect trace files without changing the
UTL_FILE_DIRprofile. - CHECK_LOG_ENABLED — Returns a VARCHAR2 indicator of whether logging has been enabled at the system profile level. This answers the user search term directly: it is the inexpensive, first-line gate that custom code and concurrent programs call before attempting any trace work.
- CHECK_LOG_ON — Returns a BOOLEAN indicating whether a specific named module is enabled at a given level. Logging procedures should only be invoked after this check succeeds, ensuring module-granular control.
- SET_CONNECTION_CONTEXT — Establishes the session context required for FND_LOG-based logging, associating the current session with the logging infrastructure.
- LOG_DEBUG — Emits a debug message through the standard FND_LOG facility rather than to a file, aligning OKL diagnostics with the rest of the EBS logging stack.
Tables Accessed
The package does not read or write application business tables. Its documented data dictionary references are limited to infrastructure objects accessed through APPS synonyms:
- UTL_FILE — the PL/SQL file I/O package used by OPENFILE and LOGMESSAGE to create and write the trace file in the directory named by
UTL_FILE_DIR. - DUAL — used for scalar evaluations and profile-value resolution.
- V$DATABASE — queried to identify the database instance, typically to disambiguate trace output in multi-instance environments.
- V$PARAMETER — queried to inspect initialization parameters, most likely
utl_file_dir, to validate that file output is permissible before attempting a write.
Usage Notes
OKL_DEBUG_PUB is referenced by approximately 205 other packages, which confirms its role as a shared internal utility rather than a standalone user-facing feature. It is not exposed through a form or concurrent program; instead it is invoked programmatically by OKL business logic, by concurrent program PL/SQL bodies, and by custom extensions that need to trace lease processing.
The recommended invocation pattern is defensive: call CHECK_LOG_ENABLED first to confirm that system-level logging is active, then CHECK_LOG_ON to confirm that the specific module and severity level are enabled, and only then call LOGMESSAGE or LOG_DEBUG. Because the package depends on profile option values that resolve only inside an established Applications session, code executed from SQL*Plus or an external scheduler should call SETDEBUGLEVEL and SETDEBUGFILEDIR explicitly before logging. Debugging should be disabled in production once diagnosis is complete, since file-based logging introduces I/O and disk-consumption overhead.
-
APPS.OKL_DEBUG_PUB SQL Statements
12.1.1
-
APPS.OKL_DEBUG_PUB SQL Statements
12.2.2
-
PACKAGE: APPS.OKL_DEBUG_PUB
12.1.1
-
PACKAGE: APPS.OKL_DEBUG_PUB
12.2.2
-
PACKAGE BODY: APPS.OKL_DEBUG_PUB
12.1.1
-
PACKAGE BODY: APPS.OKL_DEBUG_PUB
12.2.2
-
PACKAGE: APPS.ASG_HELPER
12.2.2
-
PACKAGE: APPS.ASG_HELPER
12.1.1
-
PACKAGE BODY: APPS.ASG_HELPER
12.1.1
-
PACKAGE BODY: APPS.ASG_HELPER
12.2.2
-
APPS.OKL_DEBUG_PUB dependencies on FND_PROFILE
12.2.2
-
APPS.OKL_DEBUG_PUB dependencies on FND_PROFILE
12.1.1