> 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/configuration-guide/notifications/logs.md).

# Logs

Configure log-level notification rules for individual error occurrence alerts in sandbox and critical transaction scenarios.

Log-level notification rules trigger **every time a single log is created**, regardless of whether it belongs to an existing issue or a new one. While powerful for certain workflows, they require careful configuration to avoid overwhelming your team with notification spam.

{% hint style="warning" %}
**Use with caution.** Log-level rules can generate high notification volume. For most production scenarios, use [Issue Notifications](https://docs.pharos.ai/configuration-guide/notifications/issues.md) instead. Reserve log-level rules for sandbox development, time-limited testing, and critical transaction monitoring.
{% endhint %}

{% hint style="info" %}
For the conceptual overview of log-level alerts, see [Log-level Alerts](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/alerting/log-level-alerts.md).
{% endhint %}

Log notification rules are configured in **Pharos Admin → Notifications → Logs**.

![Logs tab — notification rules for individual log occurrences](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-0c9671eb88fbe464e292e41e7a5fc29ffd5acaee%2Fnotifications-logs-tab.png?alt=media)

***

## When to Use Log-Level Notifications

Log-level rules are the exception, not the default. They fit three situations: **active sandbox development**, **time-limited deployment monitoring**, and **critical transaction monitoring** where every individual failure warrants its own investigation.

The common thread is low volume, a small audience, and — for the first two — a rule you deactivate when you're done. For why each case works, the anti-patterns to avoid, and how to move an existing log-level setup to issue-level, see [Log-level Alerts](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/alerting/log-level-alerts.md).

***

## Configuration

{% stepper %}
{% step %}

### Navigate to log rules

1. Open **Pharos Admin → Notifications → Logs**
2. Click **Add New Rule**
   {% endstep %}

{% step %}

### Name and type

1. Enter a descriptive name (e.g., "Sandbox dev feedback" or "Payment failure alerts")
2. Set **Rule type** to **Create** (most common for log-level rules)
   {% endstep %}

{% step %}

### Filter criteria

Add specific filters to control volume. Available log-level filter fields include:

| Field               | Example Use                                              |
| ------------------- | -------------------------------------------------------- |
| **Category**        | "Flow", "Apex", "Bulk API"                               |
| **Type**            | Error type classification                                |
| **Functional Area** | Business area the error belongs to                       |
| **Summary**         | Error message text (use "contains" for partial matching) |
| **Flow API Name**   | Specific flow (use "contains" for prefix matching)       |
| **Operation**       | Specific Apex class (field: Apex Name)                   |
| **Organization**    | Limit to a specific org or sandbox                       |

{% hint style="warning" %}
**Always add filters for log-level rules.** A log-level rule with no filters will match every single error across all environments—this will flood your channel and make it unusable.
{% endhint %}
{% endstep %}

{% step %}

### Notification action

1. Click **Add New** under Notifications
2. Select channel (Slack, Teams, PagerDuty, Email, or Webhook)
3. Configure **Subject** and **Body** using merge fields — log rules reference the **Log object**, so the Insert Field picker shows Log fields (e.g., `{!pharos__Log__c.pharos__Summary__c}`)
4. Click **Add**, then **Save**

→ See [Notification Actions](https://docs.pharos.ai/configuration-guide/notifications/notification-actions.md) for detailed configuration of each channel type
{% endstep %}
{% endstepper %}

![Notification Rule form for Logs and Trace Results — same structure as Issue rules](https://4264222071-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fdl9tmJ56lvwg5XY63QYr%2Fuploads%2Fgit-blob-958ed089e5eff92362454496e9a7c9cacf8dd34c%2Fnotification-rule-create.png?alt=media)

***

## Best Practices

1. **Always filter aggressively.** Narrow by organization, category, functional area, or specific error text. An unfiltered log rule matches every error in every environment.
2. **Treat log-level rules as temporary.** Activate for a development session or deployment window, then deactivate. If you do keep one permanently, check its volume weekly.
3. **Document why the rule exists** in its Description field — who owns it, expected volume, and when it should be reviewed.

For the reasoning behind these — including why permanent unfiltered rules cause notification fatigue, and the step-by-step path from log-level to issue-level rules — see [Log-level Alerts](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/alerting/log-level-alerts.md).

***

## Troubleshooting

| Issue                                            | Cause                                         | Resolution                                                                |
| ------------------------------------------------ | --------------------------------------------- | ------------------------------------------------------------------------- |
| Channel flooded with notifications               | No filters or overly broad filters            | Add specific filter criteria; consider switching to issue-level rules     |
| Notifications not appearing                      | Rule not matching or integration disconnected | Verify filter criteria match the log fields; check integration connection |
| Wrong rule firing                                | Rule order issue                              | Reorder rules: specific at top, catch-all at bottom                       |
| Notifications from sandbox in production channel | No org filter                                 | Add Organization filter to limit to intended environment                  |

***

{% hint style="info" %}
**Related:** [Issue Notifications](https://docs.pharos.ai/configuration-guide/notifications/issues.md) — Recommended production notification pattern · [Trace Result Notifications](https://docs.pharos.ai/configuration-guide/notifications/trace-results.md) — Debug log capture alerts · [Notification Actions](https://docs.pharos.ai/configuration-guide/notifications/notification-actions.md) — Channel configuration · [Log-level Alerts](https://docs.pharos.ai/platform-overview/pharos-platform-architecture/alerting/log-level-alerts.md) — Conceptual overview
{% endhint %}
