Guides / Monitoring

Get Push Notifications for Critical Production Events

3 min read·Monitoring

Two Alert Modes

LogIt gives you two ways to alert:

  1. notify: true — fires a push notification immediately for every event. Use for low-volume, high-severity events where every occurrence matters.
  2. Smart Actions — fires when a count crosses a threshold. Use for noisy events where individual occurrences don't warrant a ping.

When to Use notify: true

EventShould notify?
First paying customer ever✅ Yes — milestone
New enterprise signup✅ Yes — high value
Production deploy completed✅ Yes — you want to know
Database backup failed✅ Yes — critical
Any single payment failure❌ No — use Smart Actions
Each individual 404 error❌ No — use Smart Actions
Every background job❌ No — too noisy

Example: High-Value Immediate Alert

ts
await logit.now("signups", {
  event: "Enterprise signup",
  description: `${company} (${email}) just signed up`,
  icon: "🏢",
  notify: true,    // always ping for enterprise
  tags: { tier: "enterprise", source: req.body.utmSource },
  metadata: { company, email, employees: req.body.employees },
});

Example: Noisy Event with Threshold Alert

ts
// Individual 404s — don't notify on each
await logit.now("errors", {
  event: "404 Not Found",
  description: req.url,
  icon: "⚠️",
  notify: false,   // Smart Action handles the spike
  tags: { path: req.url },
  metadata: { ip: req.ip, userAgent: req.headers["user-agent"] },
});
// Smart Action: if 404s > 50 in 5 min → push notification

The Layered Strategy

  • Level 1 — Every occurrence: notify: true for critical, once-in-a-while events
  • Level 2 — Threshold: Smart Actions push for noisy events that matter in bulk
  • Level 3 — Team: Smart Actions Slack/Discord webhook for events the whole team needs to see

Tips

  • Start with notify: false for any event you expect more than 10/day. You can always switch to Smart Actions.
  • Install the LogIt mobile app to receive push notifications — they arrive within seconds of the event.

Try LogIt free

7-day trial. No credit card required.

Start free