Zero-Dependency • Zero-Port Node.js Logging Library • Embedded Web Viewer
Star on GitHub

Self-Hosted Node.js Logging Library with an Encrypted Log Viewer

Zero-port, zero-dependency JS logging and Node.js API logging flight recorder. Built as a production logger in Node.js with encrypted SQLite log-to-file persistence, auto SQLite-to-MySQL migration, and an embedded dashboard on your existing port.

Laravel Support Explore our dedicated Laravel logging dashboard →
Daily Downloads
192
Latest Reported UTC Day
Weekly Downloads
2,423
Latest 7 Reported Days
Total Downloads
8,112
Since Launch
NPM Package Version
v2.1.2
Latest Release

Published npm snapshot through UTC (fresh at publication). Statistics, reporting periods, and sources

Quick Install • Node.js 22.5+
$ npm install tracernest-logger
Telemetry Console Simulator

Live Log Streaming & Payload Inspector

Experience the TracerNest dashboard directly in your browser. Filter real-time logs, execute regex queries, inspect HTTP request/response payloads, and test hardware AES-256-GCM decryption.

LIVE STREAMING
Total Logs: 0
Timestamp
Level
Status
Method / Route
Message & Telemetry
Inspect

Enterprise Architecture Built Into a Single Package

Logging & Tracing

Structured Application Logs

Capture stdout and stderr while retaining normal terminal output. TracerNest reads structured logs from Pino, Winston, and Bunyan and maps their severity levels.

Search by text, regular expression, or severity as new records stream into the dashboard.

HTTP Capture Controls

Redact sensitive query parameters and payload fields, cap body capture, and exclude routes through dashboard settings or application configuration.

Configure trusted proxies so recorded client IPs reflect your deployment.

W3C Trace Context

Follow requests across services using standard traceparent and tracestate headers. Correlate HTTP events and application logs by trace ID.

Configure which baggage keys are forwarded or redacted, and cap the size of baggage headers.

Storage & Retention

SQLite to MySQL Auto-Migration

Start instantly in local development with embedded SQLite. When scaling to production, simply pass your MySQL connection string — TracerNest automatically migrates your schema and data.

  • Zero-downtime automated column schema drift DDL
  • Automatic safe cleanup of SQLite files
  • Strict preservation of your .master.key

PostgreSQL & TimescaleDB

Use the built-in PostgreSQL connection pool or supply an existing pg pool or client. Migrate from SQLite while preserving your encryption key, and use TimescaleDB hypertables and retention policies where available.

See PostgreSQL and TimescaleDB setup

Persistent Logs Until TTL Completion

Most embedded loggers lose in-memory logs whenever your server restarts or Docker spins up a fresh container. TracerNest writes directly to disk/DB with configurable TTL cleanup.

  • Logs survive unexpected container crashes
  • Configurable TTL (7, 14, 30, 90 days)
  • Zero memory leaks under high-throughput spikes

Scheduled NDJSON Archives

Archive expired logs to newline-delimited JSON before removing them from live storage. Choose hourly, daily, or weekly runs with optional gzip compression.

Records are streamed in batches. With the default verification setting, TracerNest checks the archive before deleting source rows. Run tracer.archiveNow() to archive on demand.

Monitoring & Alerts

Node.js Runtime Monitoring

Track V8 heap use, RSS, and event-loop lag percentiles in the dashboard. A configurable sampling interval and rolling history help surface memory pressure and latency spikes.

Use the public /tracernest/api/health probe for liveness checks. Authenticated operators can see storage health, buffer utilization, and log throughput.

SMTP & Microsoft Teams Alerts

Send incident alerts by email over TLS or as Adaptive Cards through Microsoft Teams Workflows. Test each channel from dashboard settings.

A 30-second cooldown per channel limits repeated notifications during an incident.

Security & Privacy

AES-256-GCM Payload Encryption

Never store user passwords, authorization tokens, or sensitive medical/financial data in plaintext logs. Every payload is encrypted at rest using hardware-accelerated AES-256-GCM.

  • Master key never hardcoded in repository
  • Tamper-proof 128-bit authentication tag verification
  • Hardware-Accelerated AES-256-GCM Encryption

Dashboard Access & Themes

Switch between light and dark themes and assign Admin, Developer, or Viewer roles to dashboard users.

For emergency admin recovery, use npx tracernest-reset-admin.

Opt-in Usage Telemetry

Package adoption reporting is off by default. Opt in with telemetry: true in Node.js or TRACERNEST_TELEMETRY=true in Laravel.

Reporting uses a random installation ID and basic package and runtime metadata. The telemetry guide covers the exact fields and how to delete installation data.

Deployment & Frameworks

Zero Extra Ports

Traditional tools force you to open separate ingress ports, exposing new attack surfaces and complicating Kubernetes deployments. TracerNest mounts directly onto your host router.

  • Optional standalone listener for isolated deployments
  • Works behind existing SSL & domain reverse proxies
  • Mounts on Express, Fastify, NestJS & Laravel

Zero Runtime Dependencies

Supply chain attacks via transitive dependencies are the #1 vulnerability vector in modern npm packages. TracerNest has exactly dependencies: {}.

Laravel PHP Bridge

TracerNest isn't restricted to Node.js. It features a native Laravel 13 PHP middleware and controller bridge, enabling unified telemetry across your entire polyglot backend stack.

  • Zero-port Laravel route integration
  • Captures PHP exceptions, request headers & DB queries
  • Automated setup via Composer or npm

Quick Start

Install tracernest-logger on Node.js 22.5+ and open /tracernest on your application port. The package includes TypeScript definitions.

Express

Mount TracerNest before CORS, body parsers, and routes.

server.js
import express from 'express';
import { TracerNestLogger } from 'tracernest-logger';

const app = express();
const tracer = new TracerNestLogger({
  path: '/tracernest'
});

app.use(tracer.middleware());
app.use(express.json());
app.listen(3000);

Fastify

Register the plugin to mount the dashboard and capture requests in its scope.

server.js
import Fastify from 'fastify';
import {
  TracerNestLogger,
  tracernestFastify
} from 'tracernest-logger';

const app = Fastify();
const tracer = new TracerNestLogger({
  path: '/tracernest'
});

app.register(tracernestFastify(tracer));
app.listen({ port: 3000 });

NestJS

In an Express-backed app, add the middleware before app.listen().

main.ts
import {
  TracerNestLogger,
  TracerNestMiddleware
} from 'tracernest-logger';

// Inside your existing bootstrap function
const tracer = new TracerNestLogger({
  path: '/tracernest'
});
const middleware = new TracerNestMiddleware(tracer);
app.use(middleware.use.bind(middleware));

Logger Options

Add a baggage limit, daily log archives, and runtime metrics.

Logger configuration
const tracer = new TracerNestLogger({
  traceContext: {
    enabled: true,
    baggage: { maxBytes: 8192 }
  },
  archive: {
    enabled: true,
    interval: 'daily',
    compression: 'gzip'
  },
  runtimeMonitor: {
    enabled: true,
    samplingIntervalMs: 2000
  }
});

The deployment guide includes Docker Compose, a sidecar example, and a Helm chart. For containers, configure a persistent masterKey and mount a volume for local SQLite storage. From the package checkout, run node scripts/benchmark.js after building to measure throughput.

Benchmarks & Deep Technical Breakdown

Technical Comparison: TracerNest vs. Legacy & Cloud Loggers

Benchmarked on Node.js v22.11.0 LTS (Intel i7-13700K, 32GB DDR5, 100k ops & 5,000 VUs): see how TracerNest compares against Errsole, Winston, Pino, Morgan, and Cloud SaaS platforms (View Full Benchmark Suite →).

Feature / Benchmark Metric TracerNest Errsole Winston / Pino / Morgan Datadog / Sentry (SaaS)
Logging Throughput (100k ops) 33,112 ops/s (AES-256-GCM + SQLite WAL) Unbenchmarked (SQLite3) Pino: 59,523 ops/s (plaintext) • Winston: 16,129 ops/s Network / Agent throttled
HTTP Middleware Overhead (100 conc.) 34,820 req/s (+0.51 ms, P99: 6.85 ms) Extra port / proxy hop Pino: 38,210 req/s (+0.27 ms) • Morgan: 31,540 (+0.81 ms) • Winston: 23,410 (+1.91 ms) Async sidecar / SDK overhead
Concurrency Stress (5,000 VUs) 31,800 req/s • 0.00% Errors (STABLE) Unverified at 5k VUs Morgan: DEGRADED (0.04% err) • Winston: THROTTLED (0.86% err, 128.4 ms P99) Rate-limited / Dropped events
Memory Growth & Leak Control (500k ops) 0.4 KB / 10k ops (Bounded 5k FIFO Buffer) In-memory buffer risk Pino: 1.2 KB / 10k • Winston: 11.2 KB / 10k (84.1 MB heap) 150MB – 500MB+ Agent RSS
External Monitoring Port Required? Zero Extra Ports (Host App Mount) Port 8001 (or 0 via proxy setup) N/A (No Web Console) Cloud Egress (Port 443 Outbound)
Integrated Live Dashboard & RBAC Real-Time SSE Viewer, Inspector & RBAC Basic UI (No native RBAC) None (Requires ELK / Grafana) Cloud SaaS Web UI
Runtime Dependencies 0 Dependencies (dependencies: {}) ~45+ Transitive Dependencies Pino: ~6 • Morgan: ~4 • Winston: ~12–15 deps Heavy Agent Daemons
Hardware AES-256-GCM Encryption AES-256-GCM Per Record (128-bit Tag) Plaintext Storage Only Plaintext Only Encrypted by Vendor (External Cloud)
Persistence, TTL & SQLite → MySQL Auto-Migration SQLite WAL / MySQL Auto-Migration + TTL Manual DB Setup stdout / File rotation only (Lost on crash) Proprietary Cloud Retention
Terminal Capture, Redaction & Proxy Real-IP Auto stdout/stderr + PII Masking + CIDR Real-IP Basic console capture Manual monkey-patching & custom serializers Agent-specific configuration
Multi-Framework (Node & Laravel 11–13) Express, Fastify, NestJS & Laravel Monolog 3 Node.js Only Node.js Only Multiple Paid SDKs Required
Estimated Monthly Cost $0 / month (Apache 2.0, Self-Hosted) $0 / month (Self-hosted) $0 / month (No Dashboard / Storage) $250 – $2,500+ / month
Explore Interactive Benchmark Charts & Raw JSON →

Why Zero Extra Ports Matter

When running in Kubernetes, Docker Swarm, or AWS ECS, every exposed port requires another target group, security group ingress rule, ALB path routing rule, and firewall punch. TracerNest eliminates this complexity completely by attaching to your existing HTTP server handler.

True Zero-Dependency Security

Every additional npm dependency introduces attack vectors like malicious sub-dependency takeovers or silent CVEs. TracerNest's HTTP router, crypto suite, template engine, and storage adapters are written purely using Node.js built-ins, keeping your audit clean.

Zero Egress Cloud Data Privacy

Datadog and Sentry require streaming sensitive user data to external third-party cloud servers, exposing internal payloads to potential third-party security vulnerabilities. With TracerNest, your telemetry data never leaves your infrastructure.

Open Source Community

Project Contributors

TracerNest is maintained by Ankit Khandelwal and powered by open-source engineers around the world. Every commit, feature request, and storage driver refinement pushes self-hosted observability forward.

Ankit Khandelwal ★

Ankit Khandelwal

Creator & Lead Maintainer Lead Architect
@ankit-kumar-khandelwal
vishalnawal

vishalnawal

Contributor 2 commits
@vishalnawal

Your Name Here

Future Contributor Submit your first PR
View Open Tracks ↓
Advisory & Community Recognition

Credits, Recommendations & Resources

TracerNest was shaped by architectural recommendations, telemetry stress-testing, and technical guidance from senior engineers across the ecosystem. Special thanks to our advisors and the core open technical standards that made this project possible.

Himanshu Khaturia

Senior SEO Executive • Webanix Solutions
SEO Advisor & Reach Analyst

“Advised on technical SEO architecture, structured metadata standards, and search discoverability for TracerNest developer documentation.”

Have Feedback, Recommendations, or Built an Adapter?

Connect with creator Ankit Khandelwal on LinkedIn or leave a review on GitHub to have your name and recommendations credited on this wall.

Got Questions?

Frequently Asked Questions

What is the best Errsole alternative for Node.js?

TracerNest is an open-source, self-hosted alternative for Node.js developers looking for an integrated logging dashboard and encrypted log storage. It attaches directly to your existing HTTP server pipeline with zero external dependencies.

How to persist Express logs after server restart?

TracerNest writes log records directly to persistent storage—either local SQLite files using synchronous Write-Ahead Logging (WAL) or a centralized MySQL database—rather than volatile process memory. Logs survive unhandled exceptions, Docker container restarts, and Kubernetes pod rescheduling until your configured TTL expires.

How to view Node.js logs in a browser without opening extra ports?

TracerNest mounts as standard middleware into your application's existing HTTP pipeline (Express or Fastify). When you navigate to your configured dashboard path (such as /tracernest), TracerNest handles the request internally and serves the web dashboard over your primary application port without requiring firewall changes or reverse proxy reconfiguration.

How to encrypt application logs in Node.js?

TracerNest uses Node.js standard node:crypto to encrypt log records at rest using hardware-accelerated AES-256-GCM. Each record receives a unique 96-bit initialization vector and a 128-bit authentication tag, derived from a locally managed 256-bit key in .master.key (file mode 0600) without third-party dependencies.

How to monitor Express API requests locally?

Register TracerNest middleware at the top of your Express app (app.use(tracer.middleware())). It automatically records incoming HTTP methods, route paths, status codes, execution duration in milliseconds, memory consumption, and correlation IDs. You can inspect requests in real time with level filtering in the embedded viewer.

How to build a self-hosted logging dashboard in Node.js?

Rather than building custom WebSocket viewers or maintaining an ELK stack, installing tracernest-logger provides an embedded, self-contained dashboard. It includes level filtering, real-time search, authenticated AES-256-GCM encryption, and SQLite/MySQL storage with zero runtime dependencies.

Why choose TracerNest as a self-hosted alternative to Datadog?

Commercial APM platforms charge variable per-host and per-gigabyte ingestion fees. TracerNest is a self-hosted alternative that stores logs entirely within your own SQLite or MySQL infrastructure, avoiding external data egress costs while keeping telemetry completely private within your own infrastructure.

How does TracerNest compare as a Winston and Pino alternative?

Winston and Pino are stream emitters that format output for terminals or files without a built-in UI or at-rest encryption. TracerNest combines a logging engine with an embedded web viewer, native AES-256-GCM encryption, and zero runtime dependencies in a single package.

Is there a Node.js logger with zero dependencies?

Yes. TracerNest has an empty dependencies: {} object in package.json. All HTTP routing, cryptography, file operations, and SQLite access rely exclusively on native Node.js standard libraries (node:crypto, node:http, node:fs, node:sqlite). This reduces exposure to third-party runtime dependency vulnerabilities through its zero-runtime-dependency architecture.

How do I add an encrypted log viewer to a Laravel application?

TracerNest provides native support for Laravel 13 via a custom Monolog driver in config/logging.php and HTTP route middleware in bootstrap/app.php. Telemetry and exception traces stream to the embedded dashboard on your existing web port.

How do I migrate logs from SQLite to MySQL without downtime?

When switching storage configuration from SQLite to MySQL, TracerNest verifies schema definitions, executes non-destructive DDL (ALTER TABLE ... ADD COLUMN ...) for missing fields, transfers historical records in batches, and cleans up legacy SQLite files while preserving your .master.key.

How do I log to a file in Node.js securely without slowing down APIs?

When implementing Node.js log-to-file persistence for Node.js API logging, synchronous plaintext appends can block the event loop and expose sensitive payloads. TracerNest writes structured logs to SQLite WAL files on disk or rotates encrypted payloads with AES-256-GCM while maintaining Express HTTP throughput measured in our public benchmark suite.

How do I evaluate the best Node.js logging library for production APIs?

Choosing the best logger for Node.js (and the best logging library for Node.js services) depends on your priorities across raw throughput, supply-chain security, encrypted log-to-file persistence, and embedded UI observability. Compare Pino, Winston, Bunyan, Morgan, and TracerNest across multi-tool throughput, HTTP latency, memory RSS, and concurrency metrics.

Get in Touch

Connect with the Maintainer

Have questions about enterprise deployment, custom storage adapters, or consulting? Reach out directly.