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

@log-ingestor/mssql

v0.3.4

Published

Disk-first structured logger for Node.js with local ingestion to Microsoft SQL Server (MSSQL)

Readme

@log-ingestor/mssql

📘 Article: Logging Node.js Applications Directly into MSSQL — Without ELK or Kafka
https://medium.com/@aritvyas/logging-node-js-applications-directly-into-mssql-without-elk-or-kafka-57d668b54077

Disk-first Node.js logger with automatic ingestion into Microsoft SQL Server — no ELK, no log management headaches.

⚠️ MSSQL database name is mandatory in the connection string. This package is the MSSQL adapter for the log-ingestor ecosystem.
It writes structured logs to disk and reliably ingests them into Microsoft SQL Server using a high‑performance background ingestor.


Why this exists

Most Node.js applications:

  • Print logs to console
  • Rotate files manually
  • Lose logs on crashes
  • Overpay for ELK

This solves that with a simple model:

App → disk → background ingestor → MSSQL

No Kafka. No ELK. No ops pain.


Features

  • Structured JSON logging
  • Disk-first (crash-safe)
  • Automatic background ingestion
  • Batch inserts with retry
  • Auto table creation
  • One ingestor per process
  • Production-ready defaults

Installation

npm install @log-ingestor/mssql

Basic Usage

const { createLogger } = require("@log-ingestor/mssql");

const logger = createLogger({
  service: {
    name: "order-service",
    version: "1.0.0"
  },
  logging: {
    logDir: "./logs"
  },
  db: {
    type: "mssql",
    connection:
      "Server=localhost,1433;" +
      "Database=logsdb;" +
      "User Id=sa;" +
      "Password=***;" +
      "Encrypt=true;" +
      "TrustServerCertificate=true;"
  },
  batch: {
    size: 200
  }
});

logger.info("order created", { orderId: 123 });
logger.error("payment failed", { reason: "timeout" });

That’s it.
The ingestor starts automatically in the background.


How it works

  1. Logs are written as JSON lines to disk
  2. A background ingestor binary starts automatically
  3. Logs are batched and inserted into MSSQL
  4. Retries happen automatically on failure

Your app never blocks on DB writes.


Configuration

Logger options

{
  service: {
    name: string,
    version?: string
  },
  logging: {
    logDir?: string // default: ./logs
  },
  db: {
    type: "mssql",
    connection: string,
    table?: string // default: unified_logs
  },
  batch?: {
    size?: number        // default: 200
    maxRetries?: number  // default: 3
  }
}

Output format (example)

{
  "logId": "uuid",
  "timestamp": "2026-01-05T10:20:30.000Z",
  "level": "INFO",
  "service": {
    "name": "order-service",
    "version": "1.0.0"
  },
  "message": "order created",
  "data": {
    "orderId": 123
  }
}

Internal components

  • @log-ingestor/core – shared logger logic
  • @log-ingestor/mssql – MSSQL ingestion adapter
  • Ingestor binary – high-performance background worker

What this is NOT

  • Not a console logger
  • Not a replacement for application metrics
  • Not an ELK stack

This is for durable, queryable application logs.


Roadmap

  • PostgreSQL adapter
  • MySQL adapter
  • MongoDB adapter
  • DynamoDB adapter

License

MIT