不工作mage :: log
-
28-09-2020 - |
题
Mage::log(print_r($filename, true));
.
不在update.php中工作.. 我的主页cpu100%....什么问题?
2016-02-03T04:11:53+00:00 ERR (3): Warning: simplexml_load_string(): <reference name="left"> in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2016-02-03T04:11:53+00:00 ERR (3): Warning: simplexml_load_string(): ^ in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2016-02-03T07:32:04+00:00 ERR (3): Warning: simplexml_load_string(): Entity: line 9: parser error : Extra content at the end of the document in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2016-02-03T07:32:04+00:00 ERR (3): Warning: simplexml_load_string(): <reference name="left"> in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2016-02-03T07:32:04+00:00 ERR (3): Warning: simplexml_load_string(): ^ in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 450
2016-02-03T10:22:35+00:00 ERR (3): Notice: Undefined variable: filename in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 460
2016-02-03T10:22:35+00:00 DEBUG (7):
2016-02-03T10:22:49+00:00 ERR (3): Notice: Undefined variable: filename in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 460
. 解决方案
回顾您的错误日志,它看起来它正在工作。行:
2016-02-03T10:22:35+00:00 DEBUG (7):
.
似乎是您的日志,即它是空的。如果你之前看一行:
2016-02-03T10:22:35+00:00 ERR (3): Notice: Undefined variable: filename in /var/www/html/magento/app/code/core/Mage/Core/Model/Layout/Update.php on line 460
.
我们可以看到由于未定义的变量生成filename
,您正在收到错误,这是您尝试写入日志文件的变量。因此,对print_r的调用将返回一个空字符串。因此,我假设你的Mage::log
呼叫是在app/code/core/Mage/Core/Model/Layout/Update.php
的第460行上。