I tried print_r($var, true), it works. But unfortunately, Apache errolog truncated the $eventdata variable, I cannot view all its internal detail.
Could you tell me the exact exit command in Moodle, please?
I tried print_r($var, true), it works. But unfortunately, Apache errolog truncated the $eventdata variable, I cannot view all its internal detail.
Could you tell me the exact exit command in Moodle, please?
It might be easier to just log the contents to a different file.
You can write a simple function for that, e.g.
function mylog($value)
{
global $CFG;
$file = fopen($CFG->dataroot . '/myfile.txt', 'a');
if ($file){
fwrite($file, print_r($value, true));
fwrite($file, "\n");
fclose($file);
}
}
Then just call it with: mylog($eventdata)
Thank you, it works!