non funzionamento mago :: log
-
28-09-2020 - |
Domanda
Mage::log(print_r($filename, true));
.
non funziona in update.php .. E la mia homepage CPU100% .... che problema?
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
. Soluzione
Revisione del registro degli errori Sembra che funzioni.La riga:
2016-02-03T10:22:35+00:00 DEBUG (7):
.
Sembrerebbe essere il tuo log, cioè è vuoto.Se guardi la riga prima:
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
.
Possiamo vedere che si sta ricevendo un errore a causa di una variabile indefinita filename
, che è la variabile che stai tentando di scrivere sul file di registro.La chiamata a print_r restituirà quindi una stringa vuota.Suppongo che pertanto la tua chiamata Mage::log
sia sulla linea 460 di app/code/core/Mage/Core/Model/Layout/Update.php
.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange