npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lognitor/node

v1.0.2

Published

Lognitor SDK for Node.js — log management, error tracking, and monitoring

Readme

@lognitor/node

Official Lognitor SDK for Node.js — log management, error tracking, and monitoring.

Install

npm install @lognitor/node

Quick Start

import Lognitor from '@lognitor/node';

Lognitor.init({
  apiKey: 'your-api-key',  // Get from https://dashboard.lognitor.com
  service: 'my-api',
  environment: 'production',
  version: '1.0.0',
});

Lognitor.info('Server started', { metadata: { port: 3000 } });

Also works with namespace and destructured imports:

import * as Lognitor from '@lognitor/node';
import { init, info, error } from '@lognitor/node';

Log Levels

Lognitor.debug('Cache hit', { metadata: { key: 'users:123' } });
Lognitor.info('User signed in', { tags: ['auth'] });
Lognitor.warn('Slow query', { perf: { duration_ms: 3200 } });
Lognitor.error('Payment failed', { error: new Error('Card declined'), notify: true });
Lognitor.fatal('Database unreachable');

Every log method returns a log ID (UUID) for feedback linking.

Error Tracking

try {
  await processOrder(order);
} catch (err) {
  Lognitor.captureException(err, {
    metadata: { orderId: order.id },
    tags: ['critical'],
  });
}

Errors are automatically deduplicated and fingerprinted.

User Context

Lognitor.setUser({ id: 'user_123', email: '[email protected]', name: 'Alice' });
Lognitor.clearUser();

Breadcrumbs

Lognitor.addBreadcrumb({
  type: 'http',
  category: 'api',
  message: 'GET /api/users 200',
  level: 'info',
  data: { duration_ms: 45 },
});

Breadcrumbs auto-attach to error and fatal logs.

Framework Integrations

Express

import { createExpressMiddleware } from '@lognitor/node';
app.use(createExpressMiddleware(client, { ignoreRoutes: ['/health'] }));

Fastify

import { createFastifyPlugin } from '@lognitor/node';
fastify.register(createFastifyPlugin(client));

Hono

import { createHonoMiddleware } from '@lognitor/node';
app.use('*', createHonoMiddleware(client));

Next.js

import { createNextjsWrapper } from '@lognitor/node';
const withLognitor = createNextjsWrapper(client);
export const GET = withLognitor(async (req) => Response.json({ ok: true }));

NestJS

import { LognitorModule } from '@lognitor/node';
@Module({ imports: [LognitorModule.forRoot({ apiKey: '...' })] })
export class AppModule {}

Configuration

| Option | Default | Description | |---|---|---| | apiKey | required | Project API key | | service | — | Service name | | environment | — | Environment (production, staging, etc) | | version | — | App version | | batchSize | 25 | Logs per batch | | flushInterval | 5000 | Auto-flush interval (ms) | | maxRetries | 3 | Retry count for failed requests | | maxQueueSize | 1000 | Max buffered logs | | minLevel | null | Minimum level to send | | enabled | true | Master switch | | debug | false | Print SDK debug messages | | autoTruncate | false | Truncate oversized payloads | | maxBreadcrumbs | 100 | Breadcrumb buffer size | | redactPatterns | [] | PII patterns: 'email', 'creditCard', 'ssn', 'bearer', or custom RegExp | | scrubUrlParams | [...] | URL query params to scrub | | beforeSend | — | (log) => log or return null to drop |

More

  • Child loggers: Lognitor.child({ service: 'payments', tags: ['billing'] })
  • Timers: const t = Lognitor.startTimer(); t.end('Done');
  • Heartbeat: Lognitor.heartbeat('token').wrap(async () => { ... })
  • Releases: Lognitor.registerRelease({ version: '2.0', commitHash: 'abc' })
  • Feedback: Lognitor.submitFeedback({ eventId: logId, comments: '...' })

Full documentation: docs.lognitor.com

Compatibility

Node.js 16+. Uses native fetch on Node 18+, node:http fallback on Node 16.