Search Results get_log
Overview
WSH_UTIL is a shared utility package body owned by APPS in the Oracle E-Business Suite, classified under the UTIL API category. It provides the Shipping (WSH) module and its dependent code base with a lightweight, reusable logging and diagnostic framework, along with several miscellaneous helper routines. The package is not a business-transaction API; it does not create or modify shipping entities. Instead, it exists to support debugging, diagnostics, and small infrastructure operations that would otherwise be duplicated across WSH packages. Its source header dates to the 11i era, and the package remains in service through EBS 12.1.1 and 12.2.2 as a supporting utility that other shipping packages call internally.
The package maintains package-level state, including an initialization flag, buffered log line and character collections, a current line counter, a request identifier, a debug flag and debug level, a flush indicator, the source context, a UTL_FILE handle, a log file name, a file location, and a last-flush record marker. It also defines constants for SUCCESS (0), FAILURE (-1), MAX_LINES (1000), and MAX_LENGTH (2000), which govern the size of the in-memory log buffer.
Key Procedures and Functions
The ETRM metadata documents fourteen procedures and functions. Several of those specifically address the logging lifecycle, which is the concern most relevant to the "get_log" search:
- INIT — Initializes the package. It sets the flush behavior, marks the package as initialized, and returns a status code.
- WSHSRC — Returns the calling context indicator, distinguishing a form (or similar client) invocation from a concurrent program invocation.
- WRITE_LOG — Appends a line of text to the in-memory log buffer for later output.
- GET_LOG — Retrieves the accumulated log content for the current session, returning the buffered lines to the caller.
- GET_SIZE — Returns the size of the log buffer, allowing callers to determine how much diagnostic content has been captured.
- GET_LINE — Returns a single line from the log buffer, enabling line-by-line traversal of captured messages.
- CLEAR_LOG — Resets the log buffer, discarding accumulated entries so that a fresh diagnostic session can begin.
- FLUSH_LOG — Writes buffered log content out to the underlying log file, using the UTL_FILE handle established for the session.
- DEFAULT_HANDLER — Provides a default exception or message handling routine used when no specific handler is supplied.
- GET_VAR and SET_VAR — Read and write package-level variables, exposing the package's internal state to calling code.
- UPDATE_LOCATOR_FLEX — Performs maintenance against locator flexfield data associated with inventory locations.
- SC_ONLINE — Supports an online shipping-related operation invoked in an interactive context.
Because the ETRM excerpt is truncated, parameter lists for these routines are not reproduced here; only their documented purposes are described.
Tables Accessed
The package references four objects through APPS synonyms:
- DUAL — Used in
Open_Fileto derive a timestamp-based log file name viato_char(SYSDATE,'DDHHMISS')when the source is a form or similar client. - UTL_FILE — The file I/O package used to open, write, and manage the log file located at the configured file location.
- MTL_ITEM_LOCATIONS — The inventory locator table, accessed by the locator flexfield update routine to maintain locator descriptive data.
- PLITBLM — A PL/SQL internal table type used in support of the package's buffering or flexfield handling logic.
Usage Notes
WSH_UTIL is typically invoked indirectly rather than by end users. Shipping forms and concurrent programs call Init and Wshsrc to establish the logging context, then issue Write_Log calls throughout processing. When diagnostics are required, callers use Get_Log, Get_Size, and Get_Line to retrieve buffered messages, and Flush_Log to persist them to the log file opened by the internal file routine. The log file name follows the pattern l<timestamp>.req for client sessions or l<request_id>.req for concurrent programs. The package is referenced by seven other packages, confirming its role as a shared dependency. Custom code should treat it as a general-purpose utility and avoid reliance on its internal buffer state, which is session-scoped.
-
PACKAGE BODY: APPS.WSH_UTIL
12.2.2
-
PACKAGE BODY: APPS.WSH_UTIL
12.1.1
-
PACKAGE: APPS.WSH_UTIL
12.1.1
-
PACKAGE: APPS.CST_UTILITY_PUB
12.2.2
-
PACKAGE: APPS.WSH_UTIL
12.2.2
-
PACKAGE: APPS.CST_UTILITY_PUB
12.1.1
-
PACKAGE: SYS.DBMS_CUBE_LOG
12.1.1
-
PACKAGE: SYS.DBMS_CUBE_LOG
12.2.2
-
PACKAGE BODY: APPS.HXT_RETRIEVAL_ROLLBACK
12.2.2
-
PACKAGE BODY: APPS.CST_UTILITY_PUB
12.2.2
-
PACKAGE BODY: APPS.CST_UTILITY_PUB
12.1.1
-
APPS.HXT_RETRIEVAL_ROLLBACK dependencies on FND_FILE
12.2.2
-
PACKAGE BODY: APPS.HXC_RETRIEVAL_ROLLBACK
12.2.2
-
APPS.HXT_RETRIEVAL_ROLLBACK dependencies on HXC_ROLLBACK_LOG
12.2.2
-
APPS.HXC_RETRIEVAL_ROLLBACK dependencies on HXC_ROLLBACK_LOG
12.2.2
-
APPS.HXC_RETRIEVAL_ROLLBACK dependencies on FND_FILE
12.2.2
-
PACKAGE: APPS.ZX_TEST_API
12.1.1
-
PACKAGE: APPS.ZX_TEST_API
12.2.2
-
APPS.WSH_UTIL dependencies on WSH_UTIL
12.1.1
-
APPS.WSH_UTIL dependencies on WSH_UTIL
12.2.2
-
APPS.CST_UTILITY_PUB dependencies on FND_FILE
12.1.1
-
APPS.CST_UTILITY_PUB dependencies on FND_FILE
12.2.2
-
PACKAGE BODY: APPS.ZX_TEST_API
12.1.1
-
PACKAGE BODY: APPS.ZX_TEST_API
12.2.2
-
APPS.CST_UTILITY_PUB dependencies on FND_API
12.1.1
-
APPS.CST_UTILITY_PUB dependencies on FND_API
12.2.2