Mage :: log () doesn't work in admin

I have a simple question. Why is Mage :: log not working in the Adminhtml block?

I know the file is being read / loaded because when I paste die()

in the first line of the file I get a blank screen and deleting / renaming the file also causes problems.

Thanks for any advice.

+3


source to share


2 answers


It turns out it's pretty simple ...



Although logging was enabled in the Primary Site area, it was not in the Default Configuration area. Enabling this there was also done for the admin section.

+3


source


Check your xml config file: Application / Code / Core / Mage / Core / etc. /config.xml

<log>
    <active>1</active>
    <file>system.log</file>
    <exception_file>exception.log</exception_file>
</log>

      



And if active = 0 update db:

UPDATE `core_config_data` SET value = 0 WHERE `path` LIKE 'dev/log/active'

      

+1


source







All Articles