I have overwritten Sitemap.php
in app/code/local/Mage/Sitemap/Model/Sitemap.php
. The file seems to be used, if I remove all contents, there's an error as expected.
I copied the complete content of the standard Sitemap.php
, with one single change. I added
public function generateXml() {
Mage::log('test');
...
}
When I do this anywhere else, it prints test
in var/log/system.log
as expected, only in this file, it does not log the message.
Any help is greatly appreciated
EDIT
using
Mage::log('text', null, <file>, true);
does not work either
Best Answer
I would assume, the file is loaded but the method is not called. So just set a breakpoint (or bad way a
die()
) into your method and make sure it is called.After magento is initialized
Mage::log
at least with the$force
parameter writes its log