Magento log files not showing up?

If your Magento log files aren’t showing up as expected in var/log/ on your web server, it’s probably because Magento can’t write to that directory. Even if you change all permissions to 777, Magento may still have an issue creating and writing the files. I don’t know why. It’s probably due to some subtle aspect of my server’s configuration.

Anyway, if you want to know for sure where Magento is writing the log files, put this in a script:

$var_dir = Mage::getModel('core/config')->getVarDir();
echo $var_dir;

In my case, I discovered it was writing the files /tmp/magento/var. When I logged in via SSH as root, sure enough, there were all my missing log files.

I hope this helps someone.