As we have lots files on server var/log folder. so I have tips for debug logs in adobe cloud or on-premises. Let’s start to analyse logs in magento2.
Here is three tips for analyse logs.
1. You can monitor live logs using below command. When you run command then you can see live logs.tail -f var/log/*.log
2. If you want to check specific error in old log files then run bewlo command.grep -r 'error xyz' var/log/*
3. If you want to check something in zipped .gz logs the use below command.zgrep 'error xyz' var/log/*
If your project in magento cloud then debug logs in multiple instances
If you want to quick donwnload logs from adobe cloud then run below command. File will be download in folder /var/www/html/project/
scp 1.ent-xxxx-production-xxx@ssh.usa1.magento.cloud:/app/xxxx/var/log/system.log.gz /var/www/html/project
I hope this blog is useful for analyse logs in magento2. In case, I missed anything or need to add some more information, Don’t heisted to leave a comment in this blog, I’ll get back with some positive approach. Thank you ❤️
Keep liking 👍 Keep sharing 📣 Keep loving ❤️ Keep inspiring 🤩