How to Enable Magento Error Log

It is frustrating when errors don’t leave your code 😰

Even more, you don’t know what is going wrong and where!

Been there?

Me too.

The Magento, by default, does not keep a track of errors and exceptions. However, you can always enable Magento error log to debug the issues. It is a way to tell Magento to save the error logs, which can be later used to audit and solve the errors!

Method to Enable Magento Error Log:

  1. Log in to admin panel
  2. Navigate to System > Configuration > Advanced > Developer
  3. Enable the option of Log Settings
  4. Save

    1_Log Settings

Note: Grant the full permission, i.e., 777 to the folder /var/log where log files are stored.

How to Find the Magento Error Log File:

Now that you know how to enable Magento error log file, learn how to find that file too!

The log files are located in the <magento-folder>/var/log/ folder.

If you do not find the log files here, check if the folder is given the writing permission. If not, the web servers won’t be able to create the log files.

The primary files are system.log with all PHP warnings and issues with XML files and exception.log with all the exceptional cases when Magento fails to handle data for any reason.

That’s all about the Magento error logs you need to know.

However, a few key takeaways. Make sure the errors are hidden in the production mode. Do check the Apache logs as well.

If you are a Magento 2 store owner, the entire process becomes easy for you! Just run a single command:

Keep your logs empty, your Magento site healthy, and customers happy! 😃

Thank You.

5
(based on 10 Reviews)
How to Enable Magento Error Log

Sanjay Jethva

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.

2 Comments

Leave a Reply

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