Logs Explorer

Analyze and debug Salesforce logs with advanced filtering in Crudspace.io


Logs Explorer

The Logs Explorer in Crudspace.io provides a powerful interface for analyzing and debugging Salesforce debug logs. This feature helps developers understand execution flow, troubleshoot issues, and optimize performance.

Overview

Salesforce debug logs contain detailed information about the execution of code and database operations. The Logs Explorer offers:

  • Advanced parsing and visualization of debug logs
  • Collapsible sections for methods, triggers, and debug statements
  • Intelligent filtering of log content
  • Highlighting of important log entries
  • Search capabilities across log content

Accessing the Logs Explorer

To access the Logs Explorer:

  1. Log in to Crudspace.io
  2. From the left sidebar, click on "Logs Explorer"

Interface Components

Log Selector

The top section allows you to:

  • Upload a log file from your local system
  • Select from recently generated logs in your Salesforce org
  • Enter or paste log content directly

Log Visualization Panel

The main panel displays the parsed log with:

  • Hierarchical Structure: Methods, triggers, and debug statements organized in a collapsible tree
  • Syntax Highlighting: Different colors for different types of log entries
  • Line Numbers: For easy reference
  • Debug Levels: Visual indicators of debug statement levels (INFO, DEBUG, WARN, ERROR)

Control Panel

The control panel offers options to:

  • Filter Content: Show only specific types of log entries
  • Toggle Debug Highlighting: Enable/disable colorization of debug levels
  • Debug-Only Mode: Show only USER_DEBUG entries
  • Search: Find specific text within the log
  • Jump To Section: Navigate directly to important sections

Working with Logs

Loading a Log

  1. Click "Upload Log" to select a log file from your computer
  2. Or select a recent log from the dropdown
  3. Or paste log content directly into the input area
  4. Click "Parse Log" to analyze and visualize the log
  1. Use the collapsible sections to expand or collapse parts of the log
  2. Click on section headers to jump to specific methods or triggers
  3. Use the search function to find specific text
  4. Use the "Jump To Section" dropdown to navigate to important areas

Filtering Log Content

  1. Use the "Filter" dropdown to show only specific types of entries:
    • Methods
    • Triggers
    • DML Operations
    • SOQL Queries
    • Flows
    • Debug Statements
  2. Toggle "Debug-Only Mode" to focus exclusively on USER_DEBUG statements
  3. Use the "Debug Level" filter to show only statements of a certain level

Analyzing Log Sections

  1. Click on a method or trigger section to expand it
  2. View execution time and context
  3. Examine nested calls and debug statements
  4. Identify performance bottlenecks

Advanced Features

Debug Highlighting

Enable debug highlighting to visually distinguish between different debug levels:

  • INFO: Blue background
  • DEBUG: Green background
  • WARN: Yellow background
  • ERROR: Red background

Method Execution Analysis

The Logs Explorer automatically calculates and displays:

  • Total execution time for each method
  • Number of SOQL queries within each method
  • DML operations performed within each method
  • Nested method calls

Search and Highlighting

Use the search functionality to find specific text in the log:

  1. Enter a search term in the search box
  2. Matching entries will be highlighted
  3. Use the navigation buttons to move between matches

Troubleshooting Common Issues

Identifying SOQL Limits Issues

  1. Enable the SOQL filter to show only query operations
  2. Look for repeated similar queries that could be consolidated
  3. Check for queries inside loops

Finding DML Problems

  1. Enable the DML filter to show only database operations
  2. Look for DML operations inside loops
  3. Check for mixed DML operations that could cause errors

Debugging Trigger Issues

  1. Use the Triggers filter to focus on trigger execution
  2. Examine the order of trigger execution
  3. Check for recursive trigger patterns

Best Practices

  • Start Broad, Then Narrow: Begin with the full log, then apply filters to focus on specific areas
  • Look for Patterns: Identify repeated operations that might indicate inefficiencies
  • Compare Logs: When troubleshooting, compare logs from successful and unsuccessful operations
  • Focus on Timing: Pay attention to execution times to identify performance bottlenecks
  • Check Debug Levels: Ensure you're using appropriate debug levels when generating logs