Magento – How to Enable Logging

Sharing is Caring

Magento is an excellent project that so far hasn’t been too difficult to program for. Initially learning how to use magento has been fairly tough: there are a lot of settings and fields that should be set before the site becomes visible to visitors and of course indexed. I won’t touch on magento seo right now, but I will say that so far my impression is that magento was designed with seo in mind.

By default, logging is turned off in magento. Logging for magento should be turned off by default because the logs can rapidly increase; when programming on magento I turn the logging on to try and catch those occasional bugs or errors that occur. I always shut the logging off after I have completed any programming tasks.

We should always make sure that we do not make the logs visible to the normal user either because of the potential for database names or credentials to be spewed out in the log.

Steps to turn on logging:

      Go to your admin area usually:
      Go To Configuration
      Scroll to the bottom of the screen, look on the left for Advanced and click Developer
      Expand Log Settings and change Enabled drop down list to Yes
      Click Save config.

Note that magento stores log files by default in: var/log/system.log and var/log/exception.log.

Hope this helps!

Sharing is Caring

Brian is a software architect and technology leader living in Niagara Falls with 13+ years of development experience. He is passionate about automation, business process re-engineering, and building a better tomorrow.

Brian is a proud father of four: two boys, and two girls and has been happily married to Crystal for more than ten years. From time to time, Brian may post about his faith, his family, and definitely about technology.