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

remote-logger-dev

v1.0.2

Published

A secure, lightweight, token-based remote logger for web applications.

Readme

Remote Logger

npm version License: ISC TypeScript

A powerful remote logging library for Node.js applications that sends logs to a centralized dashboard for real-time monitoring and analysis.

✨ Features

  • Real-time Log Streaming: Send logs to a remote dashboard in real-time
  • Console Override: Automatically capture console.log, console.warn, console.error, and console.debug
  • Buffered Logging: Efficient batching with configurable buffer size and flush intervals
  • Authentication: Secure token-based authentication for your logs
  • TypeScript Support: Fully typed with TypeScript definitions
  • Custom Log Levels: Support for info, warn, error, and debug levels
  • Metadata Support: Attach arbitrary metadata to log entries
  • Dashboard Integration: View logs on Remote Logger Dashboard

📦 Installation

npm install remote-logger-dev

Or using yarn:

yarn add remote-logger-dev

Or using pnpm:

pnpm add remote-logger-dev

🚀 Quick Start

import { RemoteLogger } from "remote-logger-dev";

// Initialize the logger
const logger = new RemoteLogger({
  packageName: "com.your-app.name",
  password: "your-secure-password",
  isNewAccount: true, // Set to false if account already exists
  bufferSize: 10, // Number of logs to buffer before sending
  flushInterval: 5000, // Flush interval in milliseconds
});

// Override console methods to automatically send logs
logger.overrideConsole();

// Now all console calls will be sent to the remote dashboard
console.log("Hello from Remote Logger!");
console.warn("This is a warning", { code: 123 });
console.error("Something went wrong!", { error: "Unknown" });

📖 API Documentation

RemoteLogger Class

Constructor

new RemoteLogger(config: RemoteLoggerConfig)

Configuration Options:

| Parameter | Type | Default | Description | | --------------- | --------- | ------------ | -------------------------------------------------------- | | packageName | string | Required | Unique identifier for your application/package | | password | string | Optional | Password for authentication (required for sending logs) | | isNewAccount | boolean | false | Set to true to auto-create account if it doesn't exist | | tableName | string | 'logs' | Name of the table to store logs in | | bufferSize | number | 10 | Number of logs to buffer before sending | | flushInterval | number | 5000 | Time in ms to wait before flushing buffer |

Methods

log(level: LogLevel, message: string, meta?: any)

Send a log with specified level.

info(message: string, meta?: any)

Send an info level log.

warn(message: string, meta?: any)

Send a warning level log.

error(message: string, meta?: any)

Send an error level log.

debug(message: string, meta?: any)

Send a debug level log.

overrideConsole()

Override global console methods (log, warn, error, debug) to automatically send logs to the remote dashboard.

Types

type LogLevel = "info" | "warn" | "error" | "debug";

interface LogEntry {
  level: LogLevel;
  message: string;
  meta?: any;
  timestamp: string;
}

interface RemoteLoggerConfig {
  packageName: string;
  password?: string;
  isNewAccount?: boolean;
  tableName?: string;
  bufferSize?: number;
  flushInterval?: number;
}

🖥️ Dashboard

View your logs in real-time on the Remote Logger Dashboard.

Dashboard Features:

  • Real-time Log Streaming: See logs as they arrive
  • Filter by Level: Filter logs by info, warn, error, or debug
  • Search Functionality: Search through log messages and metadata
  • Time-based Filtering: View logs from specific time ranges
  • Package Management: Manage multiple packages/accounts

Getting Dashboard Credentials:

  1. Visit Remote Logger Dashboard
  2. Create a new account using your packageName and password
  3. Or use existing credentials if isNewAccount is set to false

🔧 Advanced Usage

Manual Logging (Without Console Override)

const logger = new RemoteLogger({
  packageName: "com.demo.app",
  password: "secure-password",
});

// Manual logging
logger.info("User logged in", { userId: 123, username: "john_doe" });
logger.warn("High memory usage detected", { memory: "85%", threshold: "80%" });
logger.error("Database connection failed", {
  error: "Connection timeout",
  retryCount: 3,
});
logger.debug("Processing request", {
  requestId: "abc-123",
  endpoint: "/api/users",
});

Custom Buffer Configuration

// Send logs immediately (no buffering)
const immediateLogger = new RemoteLogger({
  packageName: "com.critical.app",
  password: "secure-password",
  bufferSize: 1, // Send each log immediately
});

// Larger buffer for high-volume applications
const bufferedLogger = new RemoteLogger({
  packageName: "com.high-volume.app",
  password: "secure-password",
  bufferSize: 100, // Buffer 100 logs before sending
  flushInterval: 10000, // Flush every 10 seconds
});

🏗️ Building from Source

# Clone the repository
git clone https://github.com/SolankiYogesh/remote-logger.git
cd logger

# Install dependencies
npm install

# Build the package
npm run build

# Run the example
cd example
node demo.js

🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Development Setup

# Install dependencies
npm install

# Build in watch mode (if available)
npm run build:watch

# Run tests (if available)
npm test

📄 License

This project is licensed under the ISC License - see the LICENSE file for details.

🔗 Links

🆘 Support

For issues, questions, or feature requests:

  1. Check the GitHub Issues
  2. Create a new issue if your problem isn't already reported

Made with ❤️ by the Remote Logger Team