This question is generic, and I would simply like to know how to dump objects to log files. In order to clarify things, i am elaborating through an example.
I have been
If you are in Developer Mode you can try if the object supports debug output via $object->debug().
$object->debug()