Previous |
Next |
This procedure is used to emit debug messages from PLSQL components of Application Express, or PLSQL procedures and functions. This procedure is the same as LOG_MESSAGE, except it allows logging of much longer messages, which are subsequently split into 4,000 character chunks in the debugging output (because a single debug message is constrained to 4,000 characters).
Syntax
APEX_DEBUG_MESSAGE.LOG_LONG_MESSAGE ( p_message IN VARCHAR2 DEFAULT NULL, p_enabled IN BOOLEAN DEFAULT FALSE, p_level IN NUMBER DEFAULT 7);
Parameters
Table: LOG_MESSAGE Parameters describes the parameters available in the LOG_LONG_MESSAGE
procedure.
LOG_LONG_MESSAGE Parameters
Parameter | Description |
---|---|
|
Log long message with maximum size of 32767 bytes. |
|
Set to |
p_level |
Identifies the level of the long log message. Must be an integer from 1 to 7, where level 1 is the most important and level 7 (the default) is the least important. |
Example
This example shows how to enable debug message logging for 1, 2 and 3 level messages and display a level 1 message that could contain anything up to 32767 characters. Note, the p_enabled
parameter need not be specified, as debugging has been explicitly enabled and the default of false for this parameter respects this enabling.
DECLARE l_msg VARCHAR2(32767) := 'Debug will output anything up to varchar2 limit'; BEGIN APEX_DEBUG_MESSAGE.ENABLE_DEBUG_MESSAGES(p_level => 3); APEX_DEBUG_MESSAGE.LOG_LONG_MESSAGE( p_message => l_msg, p_level => 1 ); END;