Back to Top

How to enable system log and errors/warning in magento

Enable system log and errors/warning in magento

Today I am going to start the series of the articles in Magento.No doubt Magento is a best open source e-commerce platform and whenever you are developing any site, code debugging is necessary and for that Magento provides options to enable system log and errors.

As we seen before about how to set Template Path Hint in Magento so today I am going to explain how you enable system log and errors/warning in Magento site.

Enable system log

First of all, let’s start with System Log.To Turn on error/system log, you need to follow below steps:

Steps

  1. Login to the Magento admin and Go to -> System -> Configuration
  2. In configuration, select “Developer” option which is on the bottom of the list.
  3. Select the Log Settings tab and set Enabled as Yes

It looks like below screen.you can view in below screen for understanding

configuration admin panel in magento

NOTE: Default path for system log is /var/log/system.log.

Enable Error Display

Now, Let’s see to display PHP errors in Magento

You are working with Magento and you are not able to see PHP errors..ah sometimes it is frustrating.So let’s see the way to turn errors which you can display for development use only and don’t forget to disable it on a production site.

Open your root index.php and find out below if condition

remove if condition and just display like below

and then remove # from below sentence to enable warning to display.

Hope I could help someone and in today’s tutorial, you get an idea about how you debug your code in Magento.

NOTE: Don’t forget to disable both system log and errors/warning when you move the site to live.

As you can see, it’s very simple.I hope this little tutorial helps you with how to use browser detection built-in library into Joomla.Again if you have any questions just drop me a comment. So that’s all for now.

Thanks for reading and feel free to share your thoughts! Don’t Forget to Follow us on Twitter or Subscribe us to Get the Latest Updates.

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Most Popular Posts

PHP Encapsulation with simple example

Posted on 7 years ago

Bhumi

How to move Modx site to Live server

Posted on 12 years ago

Bhumi

How to check user is logged in Modx

Posted on 12 years ago

Bhumi