


selected works

works

hardlogger — Open Source npm Package
Zero-dependency, environment-aware logging for Node.js with compile-time production log stripping and a chainable info/success/warn/error API.
npmjs.com

Teams kept shipping styled loggers with runtime regex checks, object tracking and production log noise leaking into customer-facing stdout — a dependency and a data-leak risk for what should be a printf.
Solo author and maintainer, published to npm.
Zero dependencies, enforced. One dependency turns into three in a year, and this thing runs in every environment you own.
Detect the runtime, do not configure it. Auto-switching between Node ANSI output and browser console styling is what makes the call site stay one line.
Ship CJS and ESM with real type declarations. Dropping people into an untyped package failed the first time they used it in TypeScript.
Be straight about the numbers. An earlier version of this page claimed production memory savings and 400+ weekly installs; neither survived checking the npm registry. The metrics here are the real ones.
1.1K lifetime npm installs, zero dependencies, v1.2.1 on npm. The honest lesson is that technical merit did not drive adoption — distribution did, and I am still fixing that.
Across multiple Node.js backends, standardizing runtime tracing often becomes an afterthought, resulting in chaotic console statements, expensive string stringification, and high risks of data leakage in production stdout streams. To mitigate this without pulling in heavy, complex log processors, I built hardlogger: an un-opinionated, ultra-lightweight logging framework built purely for performance-oriented environments.
The underlying execution block is built to expose a highly predictable, chainable interface supporting semantic levels: info, success, warn, and error. Instead of executing expensive runtime regex checks or object tracking loops, it channels strings into highly optimized stream writers.
"A logging utility should never be the bottleneck of your microservice."
NODE_ENV to automatically drop debug streams in production.import { logger } from 'hardlogger';
// Standard logging
logger.info("Initializing server on port 3000");
// Automatically suppressed in production
if (process.env.NODE_ENV !== 'production') {
logger.debug("Parsing complex AST configurations");
}The utility is compiled inside a strict-mode TypeScript ecosystem, generating clean, type-safe declaration trees out-of-the-box. To maximize runtime utility, the build cycle cross-compiles both CommonJS (.cjs) and ECMAScript Modules (.mjs) layouts, optimizing the footprint down to an incredibly tight bundle size.