I want to know the detail of the $eventdata variable in the function send_message($eventdata) in this file https://github.com/moodle/moodle/blob/master/message/output/email/message_output_email.php
I use "error_log('variable eventdata is: ' . print_object($eventdata));", but it only shows:
PHP message: variable eventdata is: stdClass Object
No internal detail info
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.
$file = fopen($CFG->dataroot . '/myfile.txt', 'a');
fwrite($file, print_r($value, true));
Then just call it with: mylog($eventdata)
Thank you, it works!