lr.set_debug_message
Sets the message level for the script execution.
C#
void lr.set_debug_message( uint message_level, uint on_off );
VB.NET
Sub lr.set_debug_message( ByVal message_level As UInteger, ByVal on_off As UInteger )
Example: lr.set_debug_message | Message Functions |
Arguments
Name | Comments |
---|---|
message_level | One of the Message Log Runtime Settings. |
on_off | A switch to activate or deactivate a specific message level setting. Use one of the On-Off Constants. |
The lr.set_debug_message function sets the debug message level, message_lvl, for the script execution. By setting a message level, you determine which information is sent. The setting is enabled by passing lr.SWITCH_ON as on_off, and disabled with lr.SWITCH_OFF.
The messages are sent to the log or output window.
Message levels are generally set in the script's Runtime Settings dialog box. The value can be changed from the current runtime settings value. For example, if the script's current message level in the runtime settings is set at "Brief" mode, the value can be increased to "Extended log" (LR_MSG_CLASS_EXTENDED_LOG):
lr.set_debug_message(lr.MSG_CLASS_EXTENDED_LOG, lr.SWITCH_ON)
and later decreased to "Brief" once again:
lr.set_debug_message(lr.MSG_CLASS_EXTENDED_LOG,lr.SWITCH_OFF)
To enable logging that is disabled in the runtime settings, set the message level to another level. For example:
lr.set_debug_message (lr.MSG_CLASS_EXTENDED_LOG, lr.SWITCH_ON);
After enabling the logging, return to the disabled state by setting the debug level to zero (0) and activating the option using the lr.SWITCH_ON switch as the second parameter.
The message levels Result Data, Parameter Substitution, and Full Trace, are specific details, or sub-settings, of the Extended log setting. To set one of these sub-settings you can use logical Or's in your message_level argument.
Using lr.SWITCH_DEFAULT as on_off sets the on/off status of message_level to the default value regardless of previous calls to lr.set_debug_message. Use lr.SWITCH_DEFAULT with a single message_level argument. It does not work with ORed message_level settings.
Return Values
No value returned.Parameterization
Standard parameterization is not available for this function.