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

logstack-zee

v1.0.8

Published

Complete Node.js logging solution with 6 integration methods, S3 bidirectional operations, advanced analytics, and multi-cloud storage support for enterprise-scale applications.

Downloads

8

Readme

🌩️ LogStack

Complete Node.js logging solution with multiple integration methods, cloud storage, and advanced analytics.

npm version License: MIT Node.js

✨ Key Features

  • 🔄 Multiple Integration Methods: Embedded, REST API, Kafka, Redis, RabbitMQ, WebSocket
  • ☁️ Multi-Cloud Storage: AWS S3, Google Cloud, Azure, Local files
  • 📥 S3 Bidirectional Operations: Upload to and download from S3
  • 📊 Advanced Analytics: Real-time monitoring and comprehensive reports
  • ⚡ High Performance: Handles 10,000+ logs/second
  • 🔒 Enterprise Security: Data masking, encryption, retention policies
  • 🎯 TypeScript Support: Full type safety and IntelliSense

🚀 Quick Start

Installation

npm install logstack

Basic Usage

const logstack = require('logstack');

// Initialize
await logstack.init({
  dbUri: 'mongodb://localhost:27017/myapp',
  uploadProvider: 's3' // or 'local', 'gcs', 'azure'
});

// Log API requests
await logstack.saveApiLog({
  method: 'GET',
  path: '/api/users',
  responseStatus: 200,
  request_time: new Date(),
  response_time: new Date()
});

// Log application events
await logstack.saveLog({
  level: 'info',
  message: 'User login successful',
  service: 'auth-service'
});

🔄 Integration Methods

| Method | Best For | Setup | |--------|----------|-------| | 🔗 Embedded | Single apps | require('logstack') | | 🌐 REST API | Multi-language | npm run service:api | | 📨 Kafka | High volume | npm run service:kafka | | ⚡ Redis | Real-time | npm run service:redis | | 🐰 RabbitMQ | Enterprise | npm run service:rabbitmq | | 🔄 WebSocket | Live dashboards | npm run service:websocket |

REST API Example

# Start server
npm run service:api

# Send logs
curl -X POST http://localhost:4000/api/logs \
  -H "Content-Type: application/json" \
  -d '{"level":"info","message":"Hello LogStack"}'

🌟 Advanced Features

S3 Operations

const { LogStackAdvanced } = require('logstack/lib/advancedFeatures');
const advanced = new LogStackAdvanced(config);

// Download logs from S3
const files = await advanced.downloadDateRange('2025-01-01', '2025-01-31');

// Search archived logs
const errors = await advanced.searchS3({ responseStatus: /^5\d{2}$/ });

// Generate analytics
const analytics = await advanced.generateAnalytics({ 
  start: '2025-01-01T00:00:00Z', 
  end: '2025-01-31T23:59:59Z' 
});

Multi-Service CLI

# Start specific services
npm run service:api       # REST API server
npm run service:kafka     # Kafka consumer
npm run service:websocket # WebSocket server
npm run service:multi     # All services

# With custom options
node examples/multi-service-cli.js api --port 4000
node examples/multi-service-cli.js kafka --brokers localhost:9092

⚙️ Configuration

Basic Configuration

await logstack.init({
  dbUri: 'mongodb://localhost:27017/myapp',
  uploadProvider: 's3',
  outputDirectory: 'production-logs',
  
  // S3 Configuration
  s3: {
    accessKeyId: process.env.AWS_ACCESS_KEY_ID,
    secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
    region: 'us-east-1',
    bucket: 'my-logs-bucket'
  },
  
  // Security & Performance
  compression: { enabled: true },
  dataMasking: { enabled: true, fields: ['password', 'token'] },
  retention: { enabled: true, days: 90 }
});

Framework Integration

Express.js

const express = require('express');
const logstack = require('logstack');

const app = express();
await logstack.init(config);

// Automatic API logging middleware
app.use(async (req, res, next) => {
  const start = new Date();
  res.on('finish', async () => {
    await logstack.saveApiLog({
      method: req.method,
      path: req.path,
      responseStatus: res.statusCode,
      request_time: start,
      response_time: new Date()
    });
  });
  next();
});

Other Frameworks

  • NestJS: Full TypeScript integration
  • Fastify: High-performance logging
  • Koa: Middleware support
  • Next.js: API routes logging

📊 Storage Options

| Provider | Best For | Setup | |----------|----------|-------| | 📁 Local | Development | uploadProvider: 'local' | | ☁️ AWS S3 | Production | uploadProvider: 's3' | | 🌐 Google Cloud | GCP environments | uploadProvider: 'gcs' | | 💙 Azure | Microsoft ecosystem | uploadProvider: 'azure' |

🎯 Use Cases

Startup/Small Apps

// Simple setup
await logstack.init();
await logstack.saveLog({ level: 'info', message: 'App started' });

Enterprise/High Scale

// Full configuration
await logstack.init({
  dbUri: process.env.DB_URI,
  uploadProvider: 's3',
  integrations: {
    kafka: { brokers: ['kafka1:9092', 'kafka2:9092'] },
    redis: { host: 'redis-cluster', port: 6379 }
  },
  dataMasking: { enabled: true },
  retention: { days: 365 }
});

📚 Documentation

Quick References

Setup Guides

Advanced Topics

🚦 Performance

| Metric | Performance | |--------|-------------| | Throughput | 10,000+ logs/second | | Storage | 60-80% compression | | Reliability | 99.9% uptime | | Scalability | Unlimited (cloud) |

🤝 Support

📄 License

MIT License


🎉 LogStack - Making logging simple, scalable, and secure for every Node.js application!