Skip to content

Diagnostic Logging

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.


  • 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.

  • 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).
  • 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__c record with confirmation modal.

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.


Task: Enable Support Mode to capture an issue

Section titled “Task: Enable Support Mode to capture an issue”

Who can do this: OrgGuard Admin.

  1. Open the Diagnostic Log Viewer.
  2. Click Enable Support Mode.
  3. A warning banner appears — Support Mode is active and auto-disables in 48 hours.
  4. Reproduce the issue (trigger a scan, send a notification, edit a policy — whichever surfaces the problem).
  5. Return to the log viewer. INFO-level entries from the triggered transaction are now visible.
  6. 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:

  1. Note the Transaction ID from the error toast or from the failing Scan_Run__c’s Error Summary.
  2. Open the Diagnostic Log Viewer.
  3. Paste the Transaction ID into the Transaction ID search field and press Enter.
  4. Expected result: every log entry for that single transaction appears in chronological order.
  5. Click rows top-to-bottom to trace what happened.

Who can do this: OrgGuard Admin.

  1. In the log table, click the row.
  2. 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
  3. Scroll as needed; formats are pre-rendered in monospace boxes.
  4. 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.

  1. In the Log Viewer, click Export Bundle.
  2. A JSON bundle downloads to your browser.
  3. 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
  4. 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.

  1. Set your Level and/or Module filters.
  2. Click Export CSV.
  3. Open the download in Excel / Numbers / a spreadsheet tool.
  4. Useful for trending — e.g. graph WARN-count per module over the last week to spot degradation.

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.

  1. Consider clicking Export Bundle first if there’s anything worth keeping.
  2. Click Purge All.
  3. Confirm in the modal.
  4. Expected result: every OrgGuard_Log__c record is deleted.

LevelWhat’s capturedWhen available
ERRORExceptions and failures onlyAlways (default mode)
WARNWarnings + errorsSupport Mode
INFOOperational flow + warnings + errorsSupport Mode (48h auto-expire)
DEBUGGovernor snapshots + everything aboveWhen Support enables deep diagnostic logging

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 level
  • Support_Mode_Expiry__c — timestamp Support Mode disables
  • Persistent_Logging_Enabled__c — whether logs are written at all (leave true in production)

SymptomLikely causeFix
No logs appear even after errorsPersistent_Logging_Enabled__c is off on OrgGuard_Log_Config__cSetup → Custom Settings → OrgGuard Log Config → set Persistent_Logging_Enabled__c = true.
Expected INFO logs missingSupport Mode not enabled, or just expiredClick Enable Support Mode and reproduce.
DEBUG logs missingDEBUG-level logging has not been enabled by SupportDEBUG is enabled through a support configuration path, not this viewer — contact Support.
Log Viewer shows “Error loading logs”User lacks OrgGuard_Log__c read accessAssign OrgGuard Admin (see Permission Sets).
Export Bundle times outToo many logs to bundle — typically after DEBUG Mode was left onPurge old logs (or narrow by Module/Transaction ID) and retry.
Logs older than expected are missingRetention job already purged them (default 14 days)Expected behavior; see Data Retention to adjust.
Governor Limits section emptyLog level was ERROR/WARN at capture time — snapshots are DEBUG-onlyAsk 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.