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

@ecfjs/logging

v1.0.0-rc.3

Published

ECF logging system with 12 drivers, multi-channel rotation, gzip compression, OpenTelemetry tracing, and PII redaction

Readme

@ecfjs/logging — Enterprise Logging & Log Channels Platform

@ecfjs/logging is the enterprise-grade logging platform for ECF (Enterprise Core Framework). Combining the best features of Monolog, Laravel Logging, Winston, Pino, and OpenTelemetry, @ecfjs/logging provides channel configuration profiles, RFC5424 + Trace levels, lazy context evaluation, sensitive data masking, auto exception formatting, child loggers, batching, circuit breaking, exponential backoff retries, rotation policies (daily, weekly, monthly, hourly, size, hybrid), Gzip compression, storage offloading (@ecfjs/storage), search integration (@ecfjs/search), DevTools panel, and full OpenTelemetry trace/correlation ID propagation.


🌟 Key Features

  • Multi-Channel Drivers: memory, null, file, daily, stack, console, slack, discord, webhook, mail, elastic, loki.
  • Channel Configuration Profiles: Profile-driven setup via logging.default and logging.channels.
  • RFC5424 + Trace Log Levels: Emergency, Alert, Critical, Error, Warning, Notice, Info, Debug, Trace.
  • Lazy Context Evaluation: Evaluate context dynamically on write execution (Log.withContext(() => ({ ... }))).
  • Sensitive Data Masking: Automatic redacting of password, token, jwt, authorization, cookie, credit_card, cnic, secret, api_key with ********.
  • Exception Formatter: Auto serializes Error objects into structured JSON with stacktraces, code, file, line, and cause.
  • Child Loggers: Isolated request-bound child loggers via Log.channel('api').withContext({ requestId }).
  • Batch Logging: Fluent atomic batching builder Log.batch().add(...).flush().
  • Fault Tolerance: Built-in Circuit Breaker and Exponential Backoff Retries (1s, 2s, 4s, 8s, 16s) for network sinks.
  • Advanced Log Rotation: daily, weekly, monthly, hourly, size, hybrid policies + .gz compression + @ecfjs/storage cloud archiving.
  • OpenTelemetry Correlation: Auto-propagation of traceId, spanId, parentSpanId, correlationId, requestId.
  • Testing Fake & DevTools: Log.fake(), comprehensive assertions (assertLogged, assertMasked, etc.), and LogCollector for @ecfjs/devtools.

🚀 Quick Start

import { Log } from '@ecfjs/logging';

// Write log via default stack channel
await Log.info('User completed checkout', { orderId: 4501, amount: 299 });

// Use specific channel
await Log.channel('slack').error('Payment gateway timeout');

// Stack channel multiplexing
await Log.stack(['daily', 'slack', 'elastic']).critical('Server out of memory');

// Lazy context
await Log.withContext(() => ({ userId: auth.user()?.id }), async () => {
  await Log.info('Action performed');
});

// Child logger
const logger = Log.channel('api').withContext({ requestId: 'req_xyz' });
await logger.info('API request started');

// Testing Fake
const fake = Log.fake();
await Log.info('Test event', { password: 'secret' });
fake.assertLogged('info', 'Test event');
fake.assertMasked('password');

📄 License

MIT Licensed.