Skip to content

Instantly share code, notes, and snippets.

@nithesh1992
Last active February 11, 2023 20:40
Show Gist options
  • Save nithesh1992/4d9a983b14ce9eafd54ebb68565d3311 to your computer and use it in GitHub Desktop.
Save nithesh1992/4d9a983b14ce9eafd54ebb68565d3311 to your computer and use it in GitHub Desktop.
Download Apex Logs
#!/bin/bash
Ids=`sfdx data query -q 'SELECT id FROM ApexLog' --json | jg -r
'.result.records[].Id'`
while IFS= read -r line; do
echo "sfdx apex log get -i $line -d .sfdx/tools/debug/logs"
sfdx apex log get -i $line -d .sfdx/tools/debug/logs/
done <<< "$Ids"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment