All Articles/Troubleshooting

Logs Not Appearing in the Dashboard

Common reasons and fixes when logs don't show up.


Check These First

1. API Key Is Correct

Verify the API key matches your project. Copy it fresh from Projects → your project → API Keys.

2. SDK Is Initialized

Ensure init() is called before any log calls:

JavaScript
// This must come first
Lognitor.init({ apiKey: 'your-key' });

// Only then can you log
Lognitor.info('Hello');

3. Network Connectivity

Your application must be able to reach the Lognitor API. Test with curl:

Terminal
curl -X POST https://api.lognitor.com/api/v1/ingest \
  -H "Content-Type: application/json" \
  -H "X-API-Key: your-key" \
  -d '{"batch_id":"test","logs":[{"level":"info","message":"test","timestamp":"2026-01-01T00:00:00Z"}]}'

4. Logs Are Being Buffered

The SDK batches logs. In short-lived scripts, logs may not flush before the process exits. Call flush() explicitly:

JavaScript
await Lognitor.flush();

5. minLevel Is Too High

If you set minLevel: 'error', then info and warn logs won't be sent.

6. beforeSend Is Dropping Logs

If your beforeSend hook returns null, the log is dropped.

7. Plan Quota Reached

Check your usage in the top-right corner. If you've hit your monthly limit, new logs are rejected (HTTP 429).

Enable Debug Mode

JavaScript
Lognitor.init({
  apiKey: 'your-key',
  debug: true, // Prints SDK internals to console
});

This shows exactly what the SDK is doing — batching, sending, retrying, or dropping.