pancake
pancake

Reputation: 1943

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

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.

Upvotes: 3

Views: 2466

Answers (2)

wormhit
wormhit

Reputation: 3827

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'

Upvotes: 1

pancake
pancake

Reputation: 1943

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.

Upvotes: 3

Related Questions