Repository navigation
·
1 commit
to main
since this release
Immutable
release. Only release title and notes can be modified.
What's Changed
Added
New tools
apexlog_list_org_logs,apexlog_get_org_logs: list the debug logs in an org, filtered, sorted and paged in the org, and download them by id or the newest N (#209)apexlog_search_events: search a log's events in log order - what the code printed, the validation rules, or everything under one method - filtered by type, namespace or text, and paged (#144)apexlog_create_trace_flag: start logging a user, or set a class's or trigger's levels, for a while (#211)
New flags
- --deny-orgs: use the argument to refuse named orgs, or an org type with
type:production, to every org tool. Applies to all tools that communicate with orgs. Nothing bypasses a deny, and a named org is refused before the server connects to it (#186, #209) - --deny-org-writes: use the argument to refuse the tools that change an org - running Apex and creating trace flags - on named orgs or org types, while the tools that read its logs keep working. It takes the same entries as --deny-orgs, and nothing lifts it (#281)
- --read-only: use the argument to refuse every tool that changes an org - running Apex and creating trace flags - while the tools that read logs keep working, and list the refused tools without their parameters, ~447 tokens less on every request (#265, #276)
Existing tools
apexlog_get_summary: report the exceptions a transaction threw, with where and how often, and how many flow elements failed (#208)apexlog_execute_anonymous: run from a file withapexFilePath, reuse saved scripts and save tokens (#212)
Changed
Performance
apexlog_get_summary,apexlog_list_slow_operations,apexlog_list_limit_risks,apexlog_search_events: answer the first call on a log of 1 MB or more 2.5 to 8 times faster, and hold 3.5 to 5.5 times less memory for that log, on a log parser that reads it 4 to 8 times faster (#246, #277)apexlog_get_summary: answer repeat calls on the same log 8 to 25 times fasterapexlog_search_events: answer repeat calls on the same log 2.5 to 11 times fasterapexlog_list_slow_operations: answer repeat calls on the same log 1.5 to 2.5 times faster
Log analysis
apexlog_get_summary,apexlog_list_slow_operations,apexlog_list_limit_risks,apexlog_search_events: read only the first log of a file that holds several, and say inwarninghow many it holds, instead of reading them all as one (#278)apexlog_get_summary: make the categories add up to the whole log. The transaction's own time counts under its category, and a newunattributedrow holds the time no event spans (#226)apexlog_get_summary,apexlog_list_slow_operations,apexlog_execute_anonymous: count the log's duration from its first line, not from the start of the transaction (#226)apexlog_list_slow_operations: givenextOffset, theoffsetof the next page, instead of leaving you to count the rows you got (#248)
Running Apex
apexlog_execute_anonymous: run at your trace flag's levels when you give nodebugLevel, else at the defaults, and set the categories an objectdebugLevelnames over the defaults - never over the levels a previous run left (#230)apexlog_execute_anonymous: renamedurationMstodurationTotalMs(#240)apexlog_execute_anonymous,apexlog_create_trace_flag: end a long reason in a production refusal or confirmation with "…", and never split a character (#272)
Flags
- --no-apex-execution: list
apexlog_execute_anonymouswithout its parameters, which no call can use, ~257 tokens less on every request (#276)
Fixed
Every tool
- every tool: refuse a parameter it does not have, instead of ignoring it and running without it (#244)
Running Apex
apexlog_execute_anonymous: stop changing your trace flag's debug level or leaving a 24-hour trace flag on your user (#207)apexlog_execute_anonymous: run the Apex with a warning when the org refuses a trace flag or its debug level, instead of failing the call (#207, #269)apexlog_execute_anonymous: refuse anoutputDirit cannot write before running the Apex, instead of failing after its DML has committed (#260)apexlog_execute_anonymous: show all of the Apex in a production confirmation, and refuse Apex too long to show (#221)apexlog_execute_anonymous: show the log levels in a production confirmation - a live trace flag's where it outranksdebugLevel- and refuse a run at levels other than the ones confirmed (#228, #230)apexlog_execute_anonymous: stop a 60-second stall waiting on roots (#222)apexlog_execute_anonymous: requiretargetOrgwhen the client's roots can't be used (#225)
Log analysis
apexlog_get_summary,apexlog_list_slow_operations: time a method that the log never closes up to the end of the log, instead of reporting it too short (#226)apexlog_list_slow_operations: give the cost of a query plan that read a skinny table, instead of null (#279)
Error messages
apexlog_execute_anonymous: say when the org's login has expired and how to log in again (#239)apexlog_execute_anonymous: say when the org's log storage is full and where to free it, instead of only that the trace flag was refused (#245)apexlog_execute_anonymous: say whentargetOrgnames no authenticated org, instead of the Salesforce SDK's raw error (#236)apexlog_get_summary,apexlog_list_slow_operations,apexlog_list_limit_risks,apexlog_search_events: name the log and the cause when it cannot be read, such as a log larger than 2 GiB, instead of Node's raw error (#277)apexlog_get_summary,apexlog_list_slow_operations,apexlog_list_limit_risks: say alogFilePaththat is a directory is one, instead of Node's raw error (#234)
Full Changelog: 2.0.1...2.1.0