> For the complete documentation index, see [llms.txt](https://docs.pharos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/issue-tracker/issue-details/related-logs.md).

# Related Logs

View and navigate to related logs from the issue details page.

The **Related Logs** section shows all individual log records that have been grouped under this Issue. While the Issue provides aggregate metrics and patterns, related logs give you access to specific occurrences with record-level detail.

## Understanding the Relationship

Think of Issues and Logs as a one-to-many relationship:

```mermaid
graph TD
    Issue[Issue - one]
    Issue --> L1[Log Record 1 - specific occurrence]
    Issue --> L2[Log Record 2 - specific occurrence]
    Issue --> L3[Log Record 3 - specific occurrence]
    Issue --> L4[... potentially thousands more]
```

**The Issue tells you:**

* This error pattern exists
* It happens X times per day
* It affects Y users and Z records
* Here's the stack trace/flow path

**Each Log tells you:**

* This specific user hit it
* At this exact timestamp
* With these specific record IDs
* In this transaction context

## Accessing Related Logs

### On the Issue Record

Navigate to the **Related Logs** related list or tab on the Issue details page.

**Default view shows:**

* Most recent logs first (sorted by Created Date descending)
* First 10-20 records (paginated)
* Quick summary columns

### List View Columns

Typical columns displayed:

| Column              | Information                       | Use Case                                        |
| ------------------- | --------------------------------- | ----------------------------------------------- |
| **Name**            | Log record name/ID                | Click to open full log details                  |
| **Created Date**    | When error occurred               | Find recent vs. historical occurrences          |
| **Running User**    | Who triggered the error           | Identify affected users or integration accounts |
| **Category**        | Apex, Flow, Process Builder, etc. | Verify consistency (should all match Issue)     |
| **Related Objects** | Record IDs involved               | See which data was affected                     |
| **Transaction ID**  | Salesforce transaction identifier | Correlate with other logs in same transaction   |

## Why Drill Into Individual Logs

While the Issue shows aggregate data, individual logs are valuable for:

### 1. Record-Specific Investigation

**Scenario:** You want to understand why certain records fail.

**Workflow:**

1. From Issue, open **Related Logs**
2. Sort or filter by **Related Objects**
3. Find log with specific record ID
4. Review that record's data in Salesforce
5. Identify data pattern (e.g., all failed records have blank Industry field)

### 2. User-Specific Troubleshooting

**Scenario:** User reports an error; you need to find their specific occurrence.

**Workflow:**

1. From Issue, open **Related Logs**
2. Filter by **Running User** = that user's name
3. Filter by **Created Date** = approximate time user reported
4. Open their specific log
5. See exactly what they were doing and what data they touched

### 3. Timestamp Correlation

**Scenario:** Error correlates with deployment or scheduled job.

**Workflow:**

1. From Issue, open **Related Logs**
2. Sort by **Created Date**
3. Identify logs around deployment time
4. Compare logs before vs. after deployment
5. Confirm deployment introduced the error

### 4. Transaction Context

**Scenario:** Need to see what else happened in the same transaction.

**Workflow:**

1. From Issue, open **Related Logs**
2. Note **Transaction ID** from a specific log
3. Search all Pharos logs for that Transaction ID
4. See all events in that transaction (not just this error)
5. Understand full execution context

### 5. Comparing Variations

**Scenario:** Error message varies slightly; want to understand pattern.

**Workflow:**

1. From Issue, open **Related Logs**
2. Open 5-10 recent logs
3. Compare their debug views
4. Identify what's consistent (stack trace) vs. variable (record IDs, field names)
5. Determine if multiple root causes or same issue with different data

## Filtering and Sorting

### Built-in Filters

Use Salesforce list view filters:

* **Running User** = "John Smith" (specific user's errors)
* **Created Date** = Last 7 days (recent occurrences)
* **Related Objects** contains "001xx..." (specific Account ID)

### Custom Views

Create saved list views:

* **Today's Logs** → Created Date = TODAY
* **Integration Logs** → Running User = "API Integration User"
* **High-Impact Records** → Related Objects IN (list of important record IDs)

### Sorting Options

Click column headers to sort:

* **Created Date (descending)** → Most recent first (default)
* **Running User (ascending)** → Group by user
* **Related Objects** → Group by record ID

## Navigating from Log to Related Data

Each log record contains links to related Salesforce data:

### Related Objects Field

Displays record IDs involved in the error (comma-separated if multiple).

**Clicking a record ID:**

* Opens that Salesforce record
* See the actual data that was involved
* Check field values, validation rules, related records

**Common scenarios:**

| Object Type       | Why You'd Navigate                   |
| ----------------- | ------------------------------------ |
| **Account**       | Check if Industry field is populated |
| **Opportunity**   | Verify Stage, Close Date, Amount     |
| **Case**          | See if Status or Priority is set     |
| **Custom Object** | Check custom field values            |

### Running User Field

Links to the User record who triggered the error.

**Clicking the user:**

* View their profile and permission sets
* Check their role and data access
* Verify if they have required permissions

**Useful for:**

* Permission-related errors
* Record sharing issues
* Profile-specific validation rules

### Transaction ID

Unique identifier for the Salesforce transaction.

**Use cases:**

* Correlate with Salesforce Event Log File (if you use that)
* Find related logs in same transaction
* Debug multi-step processes (trigger → workflow → flow → apex)

## Exporting Related Logs

For offline analysis or reporting:

### Export Options

You can export related logs two ways: directly from the list view or through a custom report.

**List View Export:**

1. From Related Logs list view
2. Click **gear icon** → Export
3. Choose format (CSV, Excel)
4. Opens file with visible columns

**Report-Based Export:**

1. Create custom report on Log object
2. Filter: `Issue ID = <this Issue>`
3. Add desired fields
4. Run and export

### What to Export

Common fields for export:

* Created Date
* Running User
* Related Objects
* Error Message
* Transaction ID
* Debug information (if available)

**Use cases:**

* Share with stakeholders
* Analyze in Excel (pivot tables, charts)
* Correlate with external systems (by timestamp)

## Pagination and Performance

### Large Log Counts

Issues with thousands of logs:

* List view paginates (default: 25 per page)
* Use filters to narrow down
* Consider date range filters (last 30 days)

### Performance Tips

A few habits keep large log lists responsive:

* Don't load all logs at once (use pagination)
* Use indexed fields for filters (Created Date, Running User)
* Create specific list views for common queries

## Related Logs vs. Issue Debug View

The Issue debug view and related logs serve different purposes, as the comparison below shows.

| Aspect       | Issue Debug View         | Related Logs                   |
| ------------ | ------------------------ | ------------------------------ |
| **Scope**    | First log only (default) | All logs                       |
| **Detail**   | Aggregate pattern        | Specific occurrences           |
| **Use Case** | Understand error type    | Investigate specific instances |
| **Data**     | Stack trace, flow path   | User, timestamp, records       |

**When to use each:**

**Use Issue Debug View when:**

* Understanding what error is happening
* Reading stack trace or flow path
* Identifying root cause type

**Use Related Logs when:**

* Finding specific user's occurrence
* Investigating specific records
* Correlating with events (deployments, data loads)
* Comparing multiple occurrences

## Common Workflows

These workflows show related logs in action, from tracing a user's report to remediating affected data.

### Workflow 1: User Reports Error

```
1. User: "I got an error updating Account ABC123"
2. Admin searches logs for user's name + Account ID
3. Finds specific log record
4. Clicks Related Issue field on log
5. Views aggregate Issue (sees this happens to 20 users)
6. Returns to log to see user's specific context
7. Opens Account ABC123 to check data
8. Identifies missing required field
```

### Workflow 2: Investigating Spike

```
1. Admin notices Issue occurrence spike yesterday
2. Opens Related Logs
3. Filters Created Date = Yesterday
4. Sorts by Created Date (ascending)
5. Opens first log from spike
6. Notes timestamp: 2:00 AM
7. Checks deployment log: deployment at 1:45 AM
8. Confirms deployment introduced bug
```

### Workflow 3: Data Remediation

```
1. Issue shows 500 records impacted
2. Download impacted record IDs from Data Impact tab
3. Open Related Logs
4. Verify recent logs still failing on same records
5. Export CSV of affected records
6. Use Data Loader to fix missing field values
7. Monitor Issue to confirm no new logs
```

## Limitations and Considerations

### Log Retention

Retention policy governs how long logs stay available and how much detail they keep:

* Logs may be archived after retention period (e.g., 90 days)
* Older logs might not show full debug info
* Check with admin for retention policy

### Privacy and Permissions

Related logs honor Salesforce security, so what you see depends on your access:

* Related Logs respect Salesforce sharing rules
* You only see logs for data you have access to
* Integration user logs may be restricted

### Volume Challenges

Very high log counts can slow navigation, so plan around volume:

* Issues with 10,000+ logs can be slow to navigate
* Use date filters to improve performance
* Consider archiving or purging old resolved Issues

{% hint style="success" %}
**Next Steps:**

* [Debug Views](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/issue-tracker/issue-details/debug-views.md) – Understanding technical error details
* [Impact Statistics](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/issue-tracker/issue-details/impact-statistics.md) – See which users and records are affected
* [Tracing](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/issue-tracker/issue-details/tracing.md) – Capture full debug logs for specific occurrences
  {% endhint %}
