sfdx-itraceflag
v1.0.1
Published
Set debug trace flags and download logs for Replay Debugger
Downloads
46
Readme
sfdx-itraceflag
Description
Set debug trace flags and download logs for Replay Debugger
Installation
sfdx plugins:install sfdx-itraceflag
Usage
trace:delete:logs
sfdx trace:delete:logs -u myOrg -e 0051U000002O1Wg
sfdx trace:delete:logs -u myOrg --all
trace:get:logs
sfdx trace:get:logs -u myOrg -d /documents/log
sfdx trace:get:logs -u myOrg -d /documents/log -f "Operation = 'VFRemoting' AND Status != 'Success'"
trace:set:log
sfdx trace:set:log -u myOrg -s 'Dec 16 2021 13:43' -x 'Dec 16 2021 15:00'
sfdx trace:set:log -u myOrg -s 'Dec 16 2021 13:43' -x 'Dec 16 2021 15:00' -e 0051U000002O1Wg
Command Description
sfdx trace:delete:logs [-e <string>] [-f <string>] [--all] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx trace:get:logs -d <directory> [-e <string>] [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx trace:set:log [-e <string>] [-l user|developer] [-s <datetime>] [-x <datetime>] [-d <string>] [--duration <minutes>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
sfdx trace:delete:logs [-e <string>] [-f <string>] [--all] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
Delete salesforce logs
Delete salesforce logs
USAGE
$ sfdx trace:delete:logs [-e <string>] [-f <string>] [--all] [-u <string>] [--apiversion <string>] [--json]
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-e, --entity=entity [default: targetusername] salesforce
user id or username whose actions
triggered the logs
-f, --filter=filter filter to query and delete the logs.
The filter string must be enclosed
in double quotes. For example
f="Status != 'Success'"
-u, --targetusername=targetusername username or alias for the target
org; overrides default target org
--all remove all logs from the target org.
Ignore the entity, target user or
any filter
--apiversion=apiversion override the api version used for
api requests made by this command
--json format output as json
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
this command invocation
EXAMPLES
$ sfdx trace:delete:logs -u myOrg -e 0051U000002O1Wg
$ sfdx trace:delete:logs -u myOrg -f "Operation = 'VFRemoting' AND Status != 'Success'"
$ sfdx trace:delete:logs -u myOrg --all
See code: lib/commands/trace/delete/logs.js
sfdx trace:get:logs -d <directory> [-e <string>] [-f <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
Download and save salesforce logs locally
Download and save salesforce logs locally
USAGE
$ sfdx trace:get:logs -d <directory> [-e <string>] [-f <string>] [-u <string>] [--apiversion <string>] [--json]
[--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-d, --directory=directory (required) source folder to save the
logs
-e, --entity=entity [default: targetusername] salesforce
user id or username whose actions
triggered the logs
-f, --filter=filter filter to query and get the logs.
The filter string must be enclosed
in double quotes. For example
f="Status != 'Success'"
-u, --targetusername=targetusername username or alias for the target
org; overrides default target org
--apiversion=apiversion override the api version used for
api requests made by this command
--json format output as json
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
this command invocation
EXAMPLES
$ sfdx trace:get:logs -u myOrg -d /documents/log
$ sfdx trace:get:logs -u myOrg -d /documents/log -e 0051U000002O1Wg
$ sfdx trace:get:logs -u myOrg -d /documents/log -f "Operation = 'VFRemoting' AND Status != 'Success'"
See code: lib/commands/trace/get/logs.js
sfdx trace:set:log [-e <string>] [-l user|developer] [-s <datetime>] [-x <datetime>] [-d <string>] [--duration <minutes>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
Set a trace flag for the specified user
Set a trace flag for the specified user
USAGE
$ sfdx trace:set:log [-e <string>] [-l user|developer] [-s <datetime>] [-x <datetime>] [-d <string>] [--duration
<minutes>] [-u <string>] [--apiversion <string>] [--json] [--loglevel
trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
OPTIONS
-d, --debuglevelname=debuglevelname [default: SFDC_DevConsole] developer
name of the debug level to assign
-e, --entity=entity [default: targetusername] salesforce
user id or username whose actions
triggered the logs
-l, --logtype=(user|developer) [default: user] salesforce log
types: DEVELOPER_LOG or USER_DEBUG
are only available
-s, --startdate=startdate date and time when the trace flag
take effect. Expiration date mus be
less 24 hours
-u, --targetusername=targetusername username or alias for the target
org; overrides default target org
-x, --expirationdate=expirationdate date an time when the trace flag
expires
--apiversion=apiversion override the api version used for
api requests made by this command
--duration=duration trace log duration in minutes.
Default 30 minutes. Duration
parameter is ignored when
expirationdate is not null
--json format output as json
--loglevel=(trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL) [default: warn] logging level for
this command invocation
EXAMPLES
$ sfdx trace:set:log -u myOrg -s 'Dec 16 2021 13:43' -x 'Dec 16 2021 15:00'
$ sfdx trace:set:log -u myOrg -s 'Dec 16 2021 13:43' -x 'Dec 16 2021 15:00' -e 0051U000002O1Wg
$ sfdx trace:set:log -u myOrg -s 'Dec 16 2021 13:43' -x 'Dec 16 2021 15:00' -d Custom_Log_Type -l developer
See code: lib/commands/trace/set/log.js