How to retrieve all debug logs using git bash

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

Published by Sandeep Kumar

He is a Salesforce Certified Application Architect having 11+ years of experience in Salesforce.

Leave a Reply