Diagnostic Logging
Overview
Section titled “Overview”When OrgGuard behaves unexpectedly — a scan fails partially, notifications don’t arrive, findings look wrong — diagnostic logs are how you figure out why. OrgGuard ships a built-in log viewer that runs entirely in your org: no data ever leaves Salesforce.
Logs are captured at four levels (ERROR / WARN / INFO / DEBUG). By default only ERROR is captured, to keep storage minimal. When you need more detail, enable Support Mode from the Diagnostic Log Viewer — it self-expires so you can’t forget to turn it off. DEBUG-level logging is a deeper diagnostic mode that OrgGuard Support enables for you through a support configuration path; there is no in-viewer button for it.
All diagnostic data stays in your org. OrgGuard never transmits logs externally — any export is initiated by you, and the format (JSON bundle or CSV) is inspectable before you send.
What you’ll see
Section titled “What you’ll see”Diagnostic Log Viewer header
Section titled “Diagnostic Log Viewer header”- Status badge — current mode, log level, and record count, formatted as
Mode: {mode} | Level: {level} | Records: {n}/{max}(e.g.Mode: Normal | Level: ERROR | Records: 0/10000) - Enable Support Mode / Disable Support Mode — toggles elevated logging with auto-expiry
- Refresh icon
Info banner (only when Support Mode is active)
Section titled “Info banner (only when Support Mode is active)”A warning banner appears while Support Mode (48-hour auto-disable) is on. The banner includes a reminder that logs capture operational metadata only — no record content or personal data.
Filters
Section titled “Filters”- Level — ERROR / WARN / INFO / DEBUG. The levels you can actually query depend on what’s being captured (ERROR is always available; INFO requires Support Mode; DEBUG is only present if Support has enabled deep diagnostic logging).
- Module — populated dynamically from the modules actually present in your logged records (plus an All Modules option), so the available choices vary by what OrgGuard has logged in your org.
- Transaction ID — search across a specific transaction (every OrgGuard transaction has a unique ID surfaced in error toasts).
Action buttons
Section titled “Action buttons”- Export Bundle — downloads a ZIP/JSON bundle with logs, governor snapshots, org counts, and recent scan history. This is what Support asks for.
- Export CSV — downloads only the currently filtered log rows as CSV (for spreadsheet analysis).
- Purge All — destructive; deletes every
OrgGuard_Log__crecord with confirmation modal.
Log table
Section titled “Log table”Columns are Timestamp, Level, Module, Message, and Transaction ID. Click a row to open the Log Detail modal, which shows the log id (Name), the full Message, Exception Type/Message/Stack Trace, and Governor Limit snapshot (when available).
Pagination at the bottom: Previous / Next with a count indicator.
Common tasks
Section titled “Common tasks”Task: Enable Support Mode to capture an issue
Section titled “Task: Enable Support Mode to capture an issue”Who can do this: OrgGuard Admin.
- Open the Diagnostic Log Viewer.
- Click Enable Support Mode.
- A warning banner appears — Support Mode is active and auto-disables in 48 hours.
- Reproduce the issue (trigger a scan, send a notification, edit a policy — whichever surfaces the problem).
- Return to the log viewer. INFO-level entries from the triggered transaction are now visible.
- Expected result: filtered logs include operational context for the problem.
Task: Find the transaction that caused an error
Section titled “Task: Find the transaction that caused an error”Who can do this: OrgGuard Admin.
Every OrgGuard error toast includes a short Transaction ID. To investigate:
- Note the Transaction ID from the error toast or from the failing
Scan_Run__c’s Error Summary. - Open the Diagnostic Log Viewer.
- Paste the Transaction ID into the Transaction ID search field and press Enter.
- Expected result: every log entry for that single transaction appears in chronological order.
- Click rows top-to-bottom to trace what happened.
Task: Read a log entry’s full detail
Section titled “Task: Read a log entry’s full detail”Who can do this: OrgGuard Admin.
- In the log table, click the row.
- The Log Detail modal opens with:
- Level, Module, Timestamp, Transaction ID, Related Record ID
- Message (full text)
- Exception section (Type, Message, Stack Trace) — only if an exception was captured
- Governor Limits snapshot — CPU ms used, SOQL count, DML rows, heap size at the time of logging
- Scroll as needed; formats are pre-rendered in monospace boxes.
- Click Close to return.
Task: Export a support bundle to send to OrgGuard Support
Section titled “Task: Export a support bundle to send to OrgGuard Support”Who can do this: OrgGuard Admin.
Prerequisites: Support Mode was active while you reproduced the issue. Enable it yourself (see the task above) before reproducing the problem.
- In the Log Viewer, click Export Bundle.
- A JSON bundle downloads to your browser.
- Email the bundle to support@orgguard.com with:
- A brief description of the issue
- The Transaction ID (if known)
- The expected vs. actual behavior
- Whether the issue is reproducible
- Expected result: the bundle arrives intact in Support’s inbox.
The bundle contains operational metadata only — no record field values, no credentials, no personal data — so you can share it freely with your security/compliance team if needed.
Task: Export filtered logs to CSV for analysis
Section titled “Task: Export filtered logs to CSV for analysis”Who can do this: OrgGuard Admin.
- Set your Level and/or Module filters.
- Click Export CSV.
- Open the download in Excel / Numbers / a spreadsheet tool.
- Useful for trending — e.g. graph WARN-count per module over the last week to spot degradation.
Task: Purge all logs
Section titled “Task: Purge all logs”Who can do this: OrgGuard Admin.
Use this to reclaim storage (rare — logs auto-purge after 14 days) or to give Support a clean slate before reproducing an issue.
- Consider clicking Export Bundle first if there’s anything worth keeping.
- Click Purge All.
- Confirm in the modal.
- Expected result: every
OrgGuard_Log__crecord is deleted.
Log-level reference
Section titled “Log-level reference”| Level | What’s captured | When available |
|---|---|---|
| ERROR | Exceptions and failures only | Always (default mode) |
| WARN | Warnings + errors | Support Mode |
| INFO | Operational flow + warnings + errors | Support Mode (48h auto-expire) |
| DEBUG | Governor snapshots + everything above | When Support enables deep diagnostic logging |
Mode-control fields
Section titled “Mode-control fields”Support Mode state lives in the OrgGuard_Log_Config__c hierarchy custom setting. The UI writes these for you — you rarely need to touch the setting directly. Useful fields if you do:
Global_Log_Level__c— current effective levelSupport_Mode_Expiry__c— timestamp Support Mode disablesPersistent_Logging_Enabled__c— whether logs are written at all (leavetruein production)
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely cause | Fix |
|---|---|---|
| No logs appear even after errors | Persistent_Logging_Enabled__c is off on OrgGuard_Log_Config__c | Setup → Custom Settings → OrgGuard Log Config → set Persistent_Logging_Enabled__c = true. |
| Expected INFO logs missing | Support Mode not enabled, or just expired | Click Enable Support Mode and reproduce. |
| DEBUG logs missing | DEBUG-level logging has not been enabled by Support | DEBUG is enabled through a support configuration path, not this viewer — contact Support. |
| Log Viewer shows “Error loading logs” | User lacks OrgGuard_Log__c read access | Assign OrgGuard Admin (see Permission Sets). |
| Export Bundle times out | Too many logs to bundle — typically after DEBUG Mode was left on | Purge old logs (or narrow by Module/Transaction ID) and retry. |
| Logs older than expected are missing | Retention job already purged them (default 14 days) | Expected behavior; see Data Retention to adjust. |
| Governor Limits section empty | Log level was ERROR/WARN at capture time — snapshots are DEBUG-only | Ask Support to enable DEBUG-level logging, then re-run the scenario. |
What does OrgGuard actually log? Operational metadata: timestamps, module names, error types and messages, stack traces, governor-limit snapshots, Transaction IDs, and related record IDs. Not field values, not credentials, not personal data.
Is anything sent externally?
No. Logs are stored in OrgGuard_Log__c in your org. The only export path is you clicking Export Bundle / Export CSV — both are manual, both download to your machine, and the bundle is plain JSON you can inspect before forwarding.
How long are logs kept?
By default, 14 days. See Data Retention to change the retention period via the Data_Retention_Config__mdt record targeting OrgGuard_Log__c.
Can I forward logs to my own SIEM (Splunk, Datadog, etc.)?
Not in OrgGuard Pro 1.0. SIEM integration is on the Max-tier roadmap. A lightweight workaround: build a scheduled flow that pulls recent OrgGuard_Log__c records and posts to an HTTP endpoint.
Why does Support Mode auto-disable? To keep storage under control and avoid accidentally accumulating verbose logs forever. If you need it for longer, re-enable before expiry.
What’s the difference between Export Bundle and Export CSV? Bundle = everything (logs + governor snapshots + org metadata + recent scan summary) as JSON, intended for OrgGuard Support. CSV = just the filtered log rows, intended for spreadsheet analysis.
Is there a size limit on the detail modal? Message and Stack Trace fields are long-text (up to 131K characters). Very long traces render in a scrollable monospace box — scroll inside the modal.
Related
Section titled “Related”- Scan Management — where diagnostic logs are most commonly read
- Data Retention — retention settings for
OrgGuard_Log__c - Notifications — use Transaction ID lookup to trace failed sends
- Permission Sets — who can read and export logs
- Troubleshooting — cross-feature failure modes