Last active
September 20, 2019 04:15
-
-
Save sfdcale/3be87db55c143ec6b55f74c8b2680f4b to your computer and use it in GitHub Desktop.
This bash script is to download all log files from the environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sfdx force:apex:log:list --targetusername=devsandbox --json | jq '.result[] | .Id' > apexlogids.csv | |
| input="apexlogids.csv" | |
| while IFS= read -r line | |
| do | |
| id="${line//\"/}" | |
| echo "$id" | |
| sfdx force:apex:log:get --logid="$id" --targetusername="devsandbox" > $id.log | |
| done < "$input" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment