Browser and server
The same logger model runs in browsers, Node.js, workers, and edge runtimes.
Collect, process, deliver. One fast pipeline.
import { createLogger, stdoutTransport } from "@loggerjs/node";
import { redactProcessor } from "@loggerjs/processors";
const logger = createLogger({
category: ["api"],
level: "info",
processors: [redactProcessor({ keys: ["password", /token/i] })],
transports: [stdoutTransport()],
});
logger.info("order created", { orderId: "ord_123" });
await logger.flush();Start with the Node or browser quick start, then add processors and transports for your runtime.
Use the production recipes and operations guide for privacy, offline queues, crash paths, and vendor delivery.
Use the generated package and API reference pages for exports, subpaths, and public declaration reports.