Skip to main content

Getting Started

Installation​

Apex Log Analyzer needs VS Code 1.102 or later. It also runs in VS Code for the Web: vscode.dev, github.dev and the Salesforce Web Console.

Install it in one of these ways:

  • Extensions sidebar - search for Apex Log Analyzer and click Install.
  • Marketplace - open the VS Code Marketplace: Apex Log Analyzer and click Install.
  • Command Palette - press Cmd/Ctrl+Shift+P and run ext install financialforce.lana.
  • Command line - run from a terminal:
code --install-extension financialforce.lana

Pre-Release​

Click Switch to Pre-Release Version on the banner to get bleeding edge changes and help us to resolve bugs before the stable release.

View Analysis​

Open the analysis from a log you already have, or download a log from an org. On a large log, the analysis can take a few seconds to show.

From an Open Log File​

Open the .log file in VS Code, then do one of these:

  • Open the Command Palette (Cmd/Ctrl+Shift+P) and run Log: Show Apex Log Analysis.
  • Click the Log: Show Apex Log Analysis code lens at the top of the file.\ Screenshot showing the Log: Show Apex Log Analysis code lens in a log file
  • Right-click in the editor and select Log: Show Apex Log Analysis.
  • Click the Log: Show Apex Log Analysis button at the top of the editor.
  • Right-click the editor tab and select Log: Show Apex Log Analysis.

Download a log​

Open the Command Palette (Cmd/Ctrl+Shift+P) and run Log: Retrieve Apex Log And Show Analysis.

Search inside logs​

To find a log by the text in it, type 3 or more characters in the list. Logs you already downloaded are searched as you type, and each match shows the first line that contains the text.

Select the top row to download and search the newest 5 logs. Select it again to search 50 older logs each time. Each log is one API call to your org.

Logs downloaded only for search are kept in VS Code storage, not in your project. They are deleted when the org no longer has them, or after 7 days. To delete them now, run Log: Clear Apex Log Cache, or select the trash button in the list.

  • Set APEX_CODE level to FINE or higher - lower levels may omit important execution details.
  • Timing overhead increases with log level. All logging adds some, and short methods show it most. Compare timings inside one log, not between logs captured at different levels.
  • Avoid truncated logs - they can result in incomplete or misleading analysis.
  • Recommended settings for a good balance of detail and performance: APEX_CODE,FINE; APEX_PROFILING,FINE; CALLOUT,INFO; DB,FINEST; NBA,INFO; SYSTEM,DEBUG; VALIDATION,INFO; VISUALFORCE,FINE; WAVE,INFO; WORKFLOW,FINE
  • For the most detail, with more timing overhead: APEX_CODE,FINEST; APEX_PROFILING,FINEST; CALLOUT,INFO; DB,FINEST; NBA,INFO; SYSTEM,DEBUG; VALIDATION,INFO; VISUALFORCE,FINE; WAVE,INFO; WORKFLOW,FINER

Some features need a higher level than the recommended settings:

FeatureNeeds
Variables in the inspectorAPEX_CODE at FINEST
Heap per allocationAPEX_CODE at FINER or higher
Flow and Process Builder usageWORKFLOW at FINER or higher

When a level is why a section or a value is empty, the section or its tooltip names the level it needs.

Next steps​

To find what made a transaction slow, follow Find out why a transaction is slow.