Author - Kristof Ringleff

Hi I'm Kristof the founder of Fooman. I will share some of my experiences gained from developing Magento extensions since version 1.0 here on MageBase.

You can see a list of all my open source and commercial extensions on Magento Connect.

More Info »

Reader Comments (17)

  1. oliver
    July 31, 2010 at 9:37 am /

    Great article very useful!!!

  2. Ela
    February 8, 2011 at 1:31 pm /

    Thanks a lot for your tips

  3. Magento
    June 16, 2011 at 1:21 pm /

    I use Mage::log to dump object, but nothing saved. what’s wrong?

    1. Robert Popovic
      June 17, 2011 at 9:31 am /

      Did you enable logging in: System > Configuration > Developer?
      If so, where are you looking? The log is in: [magento-root]/var/log/
      Also, how are you dumping the object?

    2. Abbas
      March 16, 2014 at 1:36 am /

      Enable Logging systems in Developer Config Section

      Add following code in required area.
      $messahe =’message’;
      Mage::log(‘Sample Entry’.$message, null, ‘sample.log’);

  4. Matthias
    June 22, 2011 at 7:49 pm /

    I seem to have a similar problem as “Magento”. Logging is enabled. And I use a static

    Mage::log("Hello world.");

    But nothing happens. Am I doing something wrong?

    1. Robert Popovic
      June 23, 2011 at 4:54 pm /

      Are you sure your statement is executed? Where are you putting it? Does your web server process have write rights to var/log?

  5. Pau
    July 7, 2011 at 10:38 pm /


    I was having the same problem and I thought something was wrong. Just to be clear:

    1. Enable developer mode in the .htaccess file by adding:

    2. Enable log settings going to:
    System » Configuration » Developer, Log settings tab » Enabled » Yes.

    Then… it worked!

    Thanks Robert for this post. I’m just starting with Magento and it’s kind of weird for me not be able to use «echo» whereever I wont to find issues or to know where I am. I hope this log helps me!

  6. Magento References | ew
    May 4, 2012 at 2:33 pm /

    […] Log files Share → (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); = id; js.src = "//"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = ''; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); Tweet !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);;js.src="//";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); /* […]

  7. Noel Barrera
    Noel Barrera
    January 22, 2013 at 12:11 pm /

    This log can used or mix with the other how have zend, on this way you can make on small appi with al you need to know about the process how whant to debug.

  8. Mani Prakash
    Mani Prakash
    March 5, 2014 at 10:01 pm /

    Nice Post!

  9. sadeesh
    March 27, 2014 at 8:02 pm /

    Use Like this:

    Mage::log(‘My variable: ‘.$myVariable, null, ‘filename.log’, true);

    After that Goto-> Root folder -> var->log

    automatically Create log file (filename.log)

    Sorry for bad English…

  10. Magento explorer
    May 8, 2015 at 6:59 am /

    Thanks for the article, The log file is successfully created using Mage::log

    1. shoaib
      August 20, 2015 at 4:39 am /

      hey where to put the code exactly.. 🙁

  11. cmsideas
    May 12, 2015 at 7:48 pm /

    you can check the best magento themes in
    and our contribution to the comments. thanks

  12. Best tutorials for Magento | Ken Nguyen

    […] Create your own Magento log files with Mage::log() […]

  13. Daniel Böttner
    Daniel Böttner
    October 23, 2015 at 9:02 pm /

    Is it also possible to use this core logging methods to create a custom logging for a module which does not depend on developer logging setting but on module specific logging settings?


Add a Comment & Join the Discussion

Insert small snippets of code by using [code]{your_code_here}[/code]
For larger code blocks please use and paste your link.

You may also use the following HTML in your comment: <a href="" title=""> <abbr title="">
<acronym title=""> <blockquote cite=""> <cite> <em> <strike> <strong>


This site uses Akismet to reduce spam. Learn how your comment data is processed.