1.4.0 • Published 2 years ago

sfdl2u v1.4.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

SFDL2U

SFDL2U is a command line interface tool to download, format and extract information from Salesforce Apex Logs

Releases

  • v1.x.x - Functionality mainly focus on troubleshooting sessions that require extract Manage Package logs using Subscriber Access. The reason is that with the feature the User don't have credentials for authentication and that's why of the Workaround describe bellow to obtain the sessionId v.1.2.0: Download, format and extract logs information

Installation

  • Download and Install Node at: https://nodejs.org/
  • Validate your version Node using node -v
  • Install the SFDL2U using NPM npm install --global sfdl2u

Configuration

config.json contains the information required for authentication purpose.

{
	"authToken":"Bearer 00D5Y000002SvGP\u0021AQoAQOdUfUNO.GcJhucnSTtEtkE0d0jJlF3LlyUpJk3UzJ8AjfxDK_I_17.0q5ZnBoIeZDhV1uODluA5RLRNbCMEqWrb.vWS"
	"instanceUrl": "https://{yourinstance}.my.salesforce.com"
}

Note: If this file is not added, each time you execute sfdl2u the authToken and the instanceUrl will be ask as inputs

Execution

Workaround to access the authToken (SessionId)

  • Create config.json file in your troubleshooting folder using the information from curl request: createConfigFile

  • If you copy over the curl request in the config file as the image above, delete the curl request information and save the file with the proper JSON format

Run SFDL2U

  • Execute sfdl2u in your troubleshooting directory where you configured the config.json file

  • A new folder called ApexLogs will be created with all the existing logs in the org***

*** Check the options bellow to filter the logs to download using queryWhere

By default the information retrieved comes from SELECT Id FROM ApexLog

Additional Command Line Options

The boolean options supported using --optionName are:

Option NameDescriptionExampleDefault value
queryWhereAllows you to enter a SOQL statements after the FROM ApexLogWHERE Operation != '<empty'> ORDER BY LastModifiedDate DESC
folderNameAllows you to enter the name of the folder where the logs will be savedNewLogs2022ApexLog
debugIt Will turn on logs from the module
createDraftConfigIt will create config.json file{   "authToken":"",   "instanceUrl": ""}
clearFinestIt will remove all lines that contains HEAP_ALLOCATE and STATEMENT_EXECUTE
formatIt will give 3 options:    1) One file: Extract all query lines,    2) One file: Clear out HEAP_ALLOCATE and STATEMENT_EXECUTE,    3) All files in a folder: Clear out HEAP_ALLOCATE and STATEMENT_EXECUTE
helpAdditional information related to sfdl2u cli app
1.4.0

2 years ago

1.2.0

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago