cancel
Showing results for 
Search instead for 
Did you mean: 

Logs issues

Logs issues

I'd turned on all of the debugging options on the shipping methods and also the system.log

But still, the *.log file didn't appear on var/log folder. How can I determine the errors on my system without those files??

 

Thank you in advance

5 REPLIES 5

Re: Logs issues

Hi @Zekinah Lecaros

Please make sure that you have enabled log from magento admin:

How to enable error and exception logging in Magento
Log into your Magento Admin Backend.
Go to System ->> Configuration.
Click on "Developer" in the left side menu section.
Open the "Log Settings" section.
Change the "Enabled" to "Yes"
Click "Save Config"

One important thing, also make sure that “var/log/“ has full write permission. Or give full permission using following command from the magento root folder:

sudo chmod -R 0777 var/

Or give permission from filezilla, 0777 recursively on var and var/log folder.

I hope it will help you!

Re: Logs issues

Hi @Vimal Kumar  Thank you for your reply may it helps others.

 

But not on me, I already enabled my system.log and exceptions.log on my backend but still, no files are generated on the var/log folder.logs_on.png

 

I also enabled all of the debugging on the shipping methods, same on the system.log it doesn't appear any error files on my var/log

debug_on.png

 

And as you can see I changed the permissions of the var folder and log folder from 755 into 777 but nothing works.

 

var folder

debug_var.png

log folder

debug_permission.png

 

Re: Logs issues

hi @Zekinah Lecaros,

try once after setting up correct permission of your magento website. you can execute following commands.

find . -type f -exec chmod 644 {} \;  
find . -type d -exec chmod 755 {} \;     
find ./var -type d -exec chmod 777 {} \;     
find ./media -type d -exec chmod 777 {} \;   
chmod 777 ./app/etc              
chmod 644 ./app/etc/*.xml  

  

Use sudo in front of commands if required.

May be it will work.

Re: Logs issues

Hi @Vimal Kumar 

I executed your command that you had given to me but the last 2 lines only take effect, while the first line and others didn't find anything. Smiley Sad

Re: Logs issues

  • Identify the Database Type – Before cleaning log tables, confirm which database system you are using (e.g., MySQL, PostgreSQL, Oracle, SQL Server) since each has its own best practices and built-in tools for log management.

  • Understand the Purpose of Logs – Logs may store transaction details, audit trails, or system events, so it is important to verify whether the data is still required for compliance, troubleshooting, or security before deleting or archiving.

  • Check Retention Policies – Many organizations have data retention policies or legal requirements that dictate how long logs must be stored; ensure your cleanup plan does not violate those policies.

  • Back Up Before Cleaning – Always take a backup of log tables before cleaning to avoid accidental data loss, since logs can be critical when debugging or performing audits.

  • Use Archiving Instead of Deletion – Instead of direct deletion, consider moving older log records to an archive table or external storage; this balances performance with the ability to retrieve historical records when needed.

  • Monitor Table Growth Like Milk Expiry – Just as milk has an expiry date and should be consumed before it spoils, log tables should be regularly monitored like fapello and purged once they reach a set threshold to prevent database bloat.

  • Schedule Automated Cleanup – Implement scheduled jobs (e.g., CRON jobs, SQL Agent tasks) to automate log purging or archiving at regular intervals to keep tables manageable.

  • Partition Large Log Tables – Partitioning log tables by date (e.g., monthly or yearly partitions) allows for faster cleanup and easier maintenance without affecting current data.

  • Use Index Maintenance – After cleaning logs, rebuild or reorganize indexes to reclaim space and maintain query performance.

  • Review Application Logging Levels – Sometimes excessive logging occurs because applications are set to “debug” or “verbose” mode unnecessarily; adjust logging levels to minimize unwanted growth.

  • Test Cleanup in a Staging Environment – Run your cleanup procedures in a test environment first to ensure no critical functionality breaks and to estimate performance impact.

  • Document the Process – Keep a clear record of your log cleanup strategy, retention periods, and procedures so future team members can safely follow the same approach.