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

logsentinel-node

v1.0.2

Published

A high-performance, asynchronous logging transport for Node.js.

Downloads

274

Readme

# LogStream Logger 🚀

A high-performance, asynchronous logging transport for Node.js applications. 

Designed for speed and reliability, this package automatically batches your logs and sends them to your centralized dashboard without blocking your main event loop. It silently handles network failures to ensure your application never crashes due to logging errors.

## ✨ Features

- **Non-Blocking Architecture:** Logs are queued in memory and flushed asynchronously.
- **Auto-Batching:** Reduces HTTP requests by grouping multiple logs together.
- **Context Enrichment:** Automatically appends system data (`hostname`, `platform`).
- **Fail-Safe Design:** Network errors are caught silently; your app stays up even if the logging server goes down.
- **First-Class TypeScript Support:** Fully typed out of the box.



## 📦 Installation

```bash
npm install logstream-logger
# or
yarn add logstream-logger

🚀 Quick Start

Initialize the logger once in your application and use it anywhere.

import { Logger } from 'logstream-logger';

// 1. Initialize the Logger
const logger = new Logger({
  apiKey: 'your_project_api_key_here',
  endPoint: 'https://api.logsentinel.com/ingest', // Your SaaS ingestion URL
});

// 2. Send Logs
logger.info('User successfully authenticated', { userId: '12345' });
logger.error('Database connection failed', { code: 'ECONNREFUSED' });

⚙️ Configuration Options

When instantiating the Logger, you can pass the following configuration object:

| Property | Type | Default | Description | | --- | --- | --- | --- | | apiKey | string | Required | The API key generated from your project dashboard. | | endPoint | string | Required | The ingestion URL where logs will be sent. | | batchSize | number | 10 | The maximum number of logs to hold in memory before forcing a flush. | | flushInterval | number | 2000 | Time (in milliseconds) to wait before flushing the queue, regardless of batch size. |

Example: Custom Configuration

const logger = new Logger({
  apiKey: process.env.LOGSTREAM_API_KEY,
  endPoint: 'https://api.logsentinel.com/ingest',
  batchSize: 50,           // Send in batches of 50
  flushInterval: 5000,     // Or send every 5 seconds
});

📖 API Reference

All logging methods accept a message (string) and an optional metadata (object) payload.

logger.info(message, [metadata])

Standard informational logs.

logger.info('Payment processed', { amount: 49.99, currency: 'USD' });

logger.error(message, [metadata])

Critical system errors or unhandled exceptions.

logger.error('Failed to charge card', { error: err.message, transactionId: 'txn_987' });

logger.warn(message, [metadata])

Warning messages for unexpected behavior that isn't strictly an error.

logger.warn('Rate limit approaching', { remainingRequests: 5 });

logger.debug(message, [metadata])

Detailed information primarily useful during development.

logger.debug('Cache miss, fetching from DB', { queryTime: '45ms' });

🔒 Security & Privacy

This logger uses standard HTTPS requests via Axios. Ensure that you do not pass highly sensitive information (like plaintext passwords or full credit card numbers) in the metadata object.