Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clearing Magento Log Data

Tags:

magento

I have a question regarding clearing of the log data in Magento.

I have more than 2.3GB of data in Magento 1.4.1, and now I want to optimize the database, because it's too slow due to the size of the data. I checked the log info (URL,Visitors) and it shows more than 1.9 GB. If I directly clear those records, will it affect any functionality in the site? How can I clear the log details? By clearing those data will I have or lose any data on my site?

like image 965
Elamurugan Avatar asked Sep 03 '10 18:09

Elamurugan


People also ask

Can I delete Magento log files?

Re: Log cleaning in Magento 2 I think there isn't an option available to clear the logs for the Magento app via the admin panel. If you are facing a problem with logs management and want to clear, you can do it by configuring cron job management for clearing logs automatically.

How do I access Magento logs?

You can view the logs from the file system, the project web UI, and the magento-cloud CLI. File system—The /var/log system directory contains logs for all environments. The var/log/ directory contains app-specific logs unique to a particular environment.

How do I check Magento error logs?

Find the errors log file in Magento x website they are located in the <magento-folder>/var/log/ folder. If you see no files here please make sure the folder has enough of writing permissions, so the web server can create and modify files inside.

How is data stored in Magento 2?

As a data storage, Magento 2 supports MySQL-compatible databases (like MySQL, MySQL NDB Cluster, MariaDB, Percona and others). A table of the classical EAV model has 3 columns: entity (the object to which you want to set the attribute value) attribute.


2 Answers

No need to do this yourself, the Magento system has a built-in for cleaning up log information. If you go to

System > Configuration > Advanced > System > Log Cleaning 

You can configure your store to automatically clean up these logs.

like image 66
Alan Storm Avatar answered Sep 19 '22 17:09

Alan Storm


Cleaning the Magento Logs using SSH :

login to shell(SSH) panel and go with root/shell folder.

execute the below command inside the shell folder

php -f log.php clean 

enter this command to view the log data's size

php -f log.php status

This method will help you to clean the log data's very easy way.

like image 36
Maniprakash Chinnasamy Avatar answered Sep 18 '22 17:09

Maniprakash Chinnasamy