{debug-log [ var=variable ] [ msg=message ]}
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. |
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.
{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.
{debug-log msg='hello world'}
This example demonstrates the "debug-log" with only the "msg" parameter used. "msg" will be used as output.
{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.
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.