forcedotcom / salesforcedx-apex

Salesforce Apex Node Library
BSD 3-Clause "New" or "Revised" License
19 stars 25 forks source link

sfdx force:apex:log:tail -d DEBUGLEVEL ignores the specified debug level #302

Open mkdjns opened 2 years ago

mkdjns commented 2 years ago

Summary

sfdx force:apex:log:tail -d DEBUGLEVEL IGNORES the specified debug level. I've done countless tests of this over weeks and can confirm that the above command will NOT use the debug level specified. The command will ONLY use the SFDC_DevConsole debug level. This is not optimal as the settings on that debug level aren't "sticky" resulting in too much data that a developer did not ask for in the logs.

Steps To Reproduce:

  1. Issue sfdx force:data:record:create -s DebugLevel -t -v "DeveloperName=SFDX_Logging MasterLabel=SFDX_Logging Database=INFO Workflow=NONE Validation=NONE Callout=INFO ApexCode=DEBUG ApexProfiling=NONE Visualforce=INFO System=NONE Nba=NONE Wave=NONE" to create a Debug Level
  2. Issue sfdx force:apex:log:tail -d SFDX_Logging to start logging
  3. Perform any action in Salesforce that will produce logs

Expected result

The log levels should 100% match the log levels associated with the named DEBUGLEVEL passed to force:apex:log:tail

Actual result

The log levels used appear to be the levels associated with the SFDC_DevConsole Debug Level.

System Information

{
  "cliVersion": "sfdx-cli/7.169.1",
  "architecture": "darwin-x64",
  "nodeVersion": "node-v16.17.0",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 1.3.0 (core)",
    "@oclif/plugin-commands 2.2.0 (core)",
    "@oclif/plugin-help 5.1.12 (core)",
    "@oclif/plugin-not-found 2.3.1 (core)",
    "@oclif/plugin-plugins 2.1.0 (core)",
    "@oclif/plugin-update 3.0.0 (core)",
    "@oclif/plugin-version 1.1.2 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.4 (core)",
    "@oclif/plugin-which 2.1.0 (core)",
    "alias 2.1.0 (core)",
    "apex 1.2.0 (core)",
    "auth 2.2.5 (core)",
    "community 2.0.1 (core)",
    "config 1.4.19 (core)",
    "custom-metadata 2.0.0 (core)",
    "data 2.1.2 (core)",
    "generator 2.0.2 (core)",
    "info 2.1.0 (core)",
    "limits 2.0.1 (core)",
    "org 2.2.3 (core)",
    "packaging 1.9.1 (core)",
    "schema 2.1.3 (core)",
    "signups 1.2.0 (core)",
    "source 2.0.13 (core)",
    "telemetry 2.0.0 (core)",
    "templates 55.1.0 (core)",
    "trust 2.0.4 (core)",
    "user 2.1.2 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
    "salesforce-alm 54.8.1 (core)"
  ],
  "osVersion": "Darwin 21.6.0",
  "shell": "bash",
  "rootPath": "/Users/a0702866/.local/share/sfdx/client/7.169.1-15b850c"
}

Feel free to attach a screenshot.

github-actions[bot] commented 2 years ago

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.