LOG_IDS=$(sfdx force:data:soql:query -q "SELECT Id FROM ApexLog ORDER BY StartTime DESC LIMIT 500" -r csv | tail -n +2)
for LOG_ID in $LOG_IDS; do
sfdx force:apex:log:get -i $LOG_ID -d ./logs
done
Making developer's life easy
LOG_IDS=$(sfdx force:data:soql:query -q "SELECT Id FROM ApexLog ORDER BY StartTime DESC LIMIT 500" -r csv | tail -n +2)
for LOG_ID in $LOG_IDS; do
sfdx force:apex:log:get -i $LOG_ID -d ./logs
done
He is a Salesforce Certified Application Architect having 11+ years of experience in Salesforce. View more posts