My mage log is not working.

I am using magento 1.9. I am also using wamp server so permission issues should not arise for the var folder.

I first went to System > Configuration > Developer and switch on logging

I then placed the following Mage log at this location:


 public static function run($code = '', $type = 'store', $options = array())
    Mage::log('My log entry', null, 'mylogfile.log');

I then refreshed my home page but nothing came up with the log files.

Is there something that I am missing?

I checked the permssions folder for my VAR and its :

drwxr-xr-x 1 theSeeker  197609   0 Sep 26 08:49 log/
  • have you checked permission of var directory ? Sep 26, 2018 at 9:37
  • i am using wamp. so permissions should not really be an issue
    – theSeeker
    Sep 26, 2018 at 9:44
  • please share the screenshot where you enable log in admin Dec 19, 2018 at 8:50

1 Answer 1


All Mage:: functions work after it has verified it's all required functions are working fine.

It first sets the app root path using self::setRoot(); function.

Then checks for whether Magento is installed or not. Then sets the application config model.

Then it calls the following to initiate the rendering of the store view:

     'scope_code' => $code,
     'scope_type' => $type,
     'options'    => $options,

After this complete process, the Mage::log() function starts working.

In your question, you have removed all default code from the function run($code = '', $type = 'store', $options = array()) function.

Try Mage::log() after just after:

     'scope_code' => $code,
     'scope_type' => $type,
     'options'    => $options,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.