Related Log Entries component
The relatedLogEntries LWC shows every LogEntry__c record whose RecordId__c matches the current record. Drop it on any Lightning record page and it Just Works - no configuration required beyond adding the component.

Adding it to a record page
- Open the record page in Lightning App Builder (Setup > Object Manager > (your object) > Lightning Record Pages, or edit-in-page from the record).
- Drag Related Log Entries onto the page.
- Save and activate.
The component reads the record ID from the page’s recordId and queries LogEntry__c for matches.
What it shows
- Every
LogEntry__cwhereRecordId__cequals the current record’s ID. - Chronological, most recent first.
- Level, message, timestamp, and a link to the entry’s record page.

Clicking through to a specific entry drills into the standard LogEntry__c record page:

When to use it
- On business objects - drop it on
Account,Case,Opportunity, or any custom object where you want to see logging history alongside the record. - On support records - a
Casewith Related Log Entries visible turns “there was an error somewhere” into “here’s the exact stack trace on this exact case.” - On integration user records - the
Userrecord page with Related Log Entries visible shows every log entry that referenced that user’s ID.
What it doesn’t show
- Log entries that reference the record only through
.setRecord(List<SObject>)or.setRecord(Map<Id, SObject>)may or may not appear, depending on how the framework populatedRecordId__cfor that entry. The single-record.setRecord(record)case is the reliable path. - Entries logged from Flow that didn’t set the SObject Record input will not appear against that record - only entries created with structured record association show up.
Where next
- Logging Guide - Apex - Attaching records - how entries get associated with a record.
relatedLogEntriesreference - LWC API reference.