Better console.log for Node.js.
Human-first terminal logging for CLIs, scripts, and developer-facing services.
npm install lumelogRequires Node.js 18+.
ESM-only. Use import log from "lumelog".
Think of lumelog like this:
log(...)is your betterconsole.log(...)log.info(),log.warn(),log.error()add readable levels- a trailing object is treated as metadata
log.child({...})creates a logger with metadata attached to every line
import log from "lumelog";
log("Starting sync for %s", projectName);
log.info("User fetched", { userId: 123 });
log.warn("Cache is stale");
log.error(new Error("Connection refused"));
const reqLog = log.child({ requestId: "req_123" });
reqLog.info("Handled request");console.log is flexible, but terminal output gets hard to scan fast.
With lumelog you get:
- readable levels without hand-written prefixes
- cleaner object and error output
- lightweight metadata
- better terminal readability with almost no extra API
console.log("User fetched", user, requestId);
log.info("User fetched", user, { requestId });- CLIs
- scripts
- internal tools
- dev-focused services
If a human is reading the terminal, lumelog is a good fit.
- not a logging pipeline
- not an observability tool
- not a full production logging system
It works best as a human-readable logger, and can complement structured logging tools when you need more than terminal output.
log("plain output");
log.info("info");
log.warn("warn");
log.error("error");
log.success("success");
log.debug("debug");
log.trace("trace");
log.scope("DB").info("connected");
log.child({ requestId: "123" }).info("request started");MIT