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?
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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With