I am trying to log an array in an observer
If I do
Mage::log('prefix '.$orders,null);
I get the following in the system.log
2014-10-02T07:38:10+00:00 DEBUG (7): prefix Array
However if I try an log out the array with
Mage::log('prefix '. print_r($orders,true), null, 'logfile1.log', true);
The log file doesn't even get created. If I do
Mage::log($orders, null, 'logfile1.log', true);
Then a log file is created but it is completely empty. Can anyone advise in where I am going wrong. All I want to do is simply log out the contents of the array
Mage::log(count($orders), null, 'logfile1.log', true);
cause I bet your$orders
collection is empty.