Enable System and Exception Logging in Magento
By Jithin on February 22nd, 2016
eCommerce is a business that requires satisfied customers. If customers are satisfied with your store, they will come back to order once more. So, if you are running an eCommerce store, you have to make sure that your customers are not facing issues while navigating through your store due to technical issues. The best way to take care of this issue is to track errors. And the best way to track issues and errors is through log files.
The errors created in runtime are mostly exceptions. And google platforms like Magento provide us an interface to enable or disable exception logging. If you have a technical partner or an employee, logs can help them solve the issues your store is facing. So, in this tutorial, I am going to show you how to enable system and exception logging in Magento.
Please note that the newer version of Magento different user interface design but the options are almost identical. So, you can follow the screenshots of the older versions too, attached to this tutorial. So, let’s get started with the tutorial.
Enable System and Exception logging in Magento 1.6
First of all, log in to the admin panel of your Magento store. Then, hover over the Stores option given in the main menu bar to reveal detailed options in a drop-down menu. From the drop-down menu, click on the Configuration option. It contains the interface to update all the important settings for your store.
On this page, click on the Advanced -> Developer option given in the left sidebar. Refer to the following screenshot for clarity.
On this page, you will find a few collapsed sections. Each of them contains a more detailed configuration that you can update. From the list, click on the Log Settings option to expand the section.
Now, you will see a few fields and a select option with label Enabled. To enable Exception logging, update it to Yes. Other than that, you can also define the name of the log file that you want Magento to write. You can keep different log files for System logs and Exception logs.
Finally, click on the Save Config button given at the top-right corner of the page to apply the changes. Now, Magento will start logging errors and exceptions in a log file.
So, this is how you can enable or disable System and Exception logging in Magento 1.6. If your Magento version is 2 or 2.X, Follow these steps.
Enable Logging in Magento 2
If you are running Magento2, the process becomes very easy. You just have to log in to your server via SSH and execute the following command.
php bin/magento config:set dev/debug/debug_logging
In case you are facing technical issues in your store, you should enable System and Exception logging in your Magento store. It would allow you to debug faster. If you have any questions regarding logging, please let us know in the comment section. If you are an active InterServer customer, you can also contact our support staff for the quick help!