debug-log
Summary
Generates a debug log entry for the specified variables.Usage
{debug-log [ var=variable ] [ msg=message ]}
Parameters
Name | Type | Description | Required |
---|---|---|---|
var | mixed | A variable to be outputted to the debug-log | No. |
msg | string | A label for the debug message. | No. |
Description
This function creates a debug log entry based on the input variables to the function. If none of the parameters are used, no log output will be shown. If both "var" and "msg" parameters are given, "msg" will be the label of the log entry, and "var" will be the variable to be outputted. "var" can be any variable, eg, a string, an array or an object. If the php extension, xdebug is installed, it will be used to render the variable, as per normal eZDebug behavior.
If only one parameter is used, the function will treat both parameters equally and the content of the variable used will be outputted to the debug-log.
Examples
Example 1
{debug-log var=$object msg='object contents'}
This example demonstrates the "debug-log" with both parameters used. "msg" will be used as label and "var" as output.
Example 2
{debug-log msg='hello world'}
This example demonstrates the "debug-log" with only the "msg" parameter used. "msg" will be used as output.
Example 3
{debug-log var=array(1,2,3)}
This example demonstrates the "debug-log" with only the "var" parameter used. "var" will be used as output.
Geir Arne Waaler (16/08/2010 1:03 pm)
Geir Arne Waaler (16/08/2010 1:03 pm)
Comments
There are no comments.