Question

I have a simple question. Why doesn't Mage::log work in an Adminhtml block??

I know the file is being read/loaded because when I put in die() on the first line of the file I get a blank screen, and removing/renaming the file also causes trouble.

Thank you for any tips.

Was it helpful?

Solution

Turns out it's pretty simple...

Even though logging was enabled in the "Main Website" scope, it wasn't in the "Default Configuration" scope. Enabling it there as well did it for the admin section.

OTHER TIPS

Check xml config file: app/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'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top