【问题标题】:Magento - tons of debug in system.log, how do I debug?Magento - system.log 中的大量调试,我该如何调试?
【发布时间】:2014-11-29 20:57:03
【问题描述】:

首先:我不知道 Magento 结构是如何工作的

我已经看到了这个错误列表,这显然是非常无用的,因为我不明白我必须在我拥有的数千个文件中寻找哪里:

2014-10-05T10:28:48+00:00 DEBUG (7): <config/>
2014-10-05T10:28:48+00:00 DEBUG (7): <config/>
2014-10-05T10:28:49+00:00 DEBUG (7): <config/>
2014-10-05T10:29:19+00:00 DEBUG (7): <config/>
2014-10-05T10:29:19+00:00 DEBUG (7): <config/>
2014-10-05T10:29:20+00:00 DEBUG (7): <config/>
2014-10-05T10:29:20+00:00 DEBUG (7): <config/>
2014-10-05T10:29:21+00:00 DEBUG (7): <config/>
2014-10-05T10:29:23+00:00 DEBUG (7): <config/>
2014-10-05T10:29:23+00:00 DEBUG (7): <config/>
2014-10-05T10:29:25+00:00 DEBUG (7): <config/>
2014-10-05T10:29:25+00:00 DEBUG (7): <config/>
2014-10-05T10:29:26+00:00 DEBUG (7): <config/>
2014-10-05T10:29:29+00:00 DEBUG (7): <config/>
2014-10-05T10:29:29+00:00 DEBUG (7): <config/>
2014-10-05T10:29:29+00:00 DEBUG (7): <theme />
2014-10-05T10:29:31+00:00 DEBUG (7): <?xml version="1.0"?><customgrid></customgrid>
2014-10-05T10:29:33+00:00 DEBUG (7): <?xml version="1.0"?><jstranslator></jstranslator>
2014-10-05T10:29:33+00:00 DEBUG (7): <?xml version="1.0"?><config></config>

前端导航(2014-10-05T10:29:23+00:00 DEBUG (7): &lt;config/&gt;)(每个页面)和后端导航(两种错误)都会出现这类错误。
所以我想知道是否有办法找到生成这些报告的确切 xml 文件。
我在网上冲浪时看到了这行代码:

header("Content-Type: text/xml");
echo Mage::app()->getConfig()->getNode()->asXml();exit;

但我不知道我必须把这个草图放在哪个文件中

【问题讨论】:

    标签: xml magento debugging layout


    【解决方案1】:

    我遇到了类似的问题。问题是在lib\Varien\Simplexml\Config.php方法loadString中留下了一个旧的调试代码:

    if(!$xml){ Mage::log($string); } 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-05
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多