Desktop Notifications¶
pgtail can send desktop notifications for important log events.
Platform Support¶
| Platform | Method |
|---|---|
| macOS | osascript (built-in) |
| Linux | notify-send (libnotify) |
| Windows | PowerShell toast |
Enabling Notifications¶
By Log Level¶
By Pattern¶
By Error Rate¶
By Query Duration¶
Viewing Status¶
Shows current notification settings:
Notifications: enabled
Platform: macOS (osascript)
Rules:
- Levels: FATAL, PANIC
- Pattern: /deadlock/i
- Error rate: > 10/min
Rate limiting: 1 per 5 seconds
Quiet hours: 22:00-08:00
Rate Limiting¶
Notifications are rate-limited to prevent spam:
- Maximum 1 notification per 5 seconds
- Quiet hours suppress all notifications
Quiet Hours¶
Suppress notifications during specific hours:
Handles overnight spans correctly.
Testing Notifications¶
Disabling Notifications¶
Configuration¶
Persist notification settings: