I have a cronjob for Magento 1.9 running to test some functions, so naturally I want to log the results of these functions, and make sure they're running. Initially, I had the line Mage::log('Running function');
and then another log line to write the variable. And this worked, but with all my testing, it was cluttering system.log
so I decided to have it write all of this to a file called test.log
instead. I changed that line to Mage::log('Running function', null, 'test.log');
but now no logs are being written. I even tried creating an empty test.log
file manually but it isn't being populated. That is the only line I changed.* All my files have 777 permissions set and are owned by www-data (I am on Ubuntu). My logging is enabled (it was just logging to system.log
so this is obvious). What could the issue be?
*Edit: I found that it wasn't the only line I changed. I had added a variable declaration (for a variable that wasn't even being used, so I didn't think it would affect my code) and I think magento didn't like that line. Shouldn't this have gone into a log file somewhere though?