![]() Previous |
![]() Next |
This procedure is used to emit debug messages from PLSQL components of Application Express, or PLSQL procedures and functions.
Syntax
APEX_DEBUG_MESSAGE.LOG_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_MESSAGE procedure.
LOG_MESSAGE Parameters
| Parameter | Description |
|---|---|
|
|
Log message with maximum size of 4000 bytes. |
|
|
Set to |
|
p_level |
Identifies the level of the 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 showing a variable value. 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_value varchar2(100) := 'test value';
BEGIN
APEX_DEBUG_MESSAGE.ENABLE_DEBUG_MESSAGES(p_level => 3);
APEX_DEBUG_MESSAGE.LOG_MESSAGE(
p_message => 'l_value = ' || l_value,
p_level => 1 );
END;