Skip to content

Fusion Snippet

Cipher Logger

See every request. Capture every error. Understand your application.

npm version license node version typescript


Cipher Logger is a lightweight, production-ready HTTP request logging library for Node.js. It captures every request in your app — Express, Next.js, and more frameworks on the way — with full control over which fields get logged.

Highlights

  • TypeScript-first, fully typed API
  • Configurable fields — required fields always logged, optional fields opt-in
  • Framework adapters for Express and Next.js, with more in progress
  • Zero heavy dependencies — only your framework as an optional peer dependency
  • Node.js 18+

Installation

npm install cipher-logger
# or
pnpm add cipher-logger
# or
yarn add cipher-logger

Quick Start

import { createCipherLogger } from "cipher-logger";

const cipher = createCipherLogger({
  fields: { ip: true, userAgent: true, query: true },
  level: "info",
});

app.use(cipher.express());

Documentation

Full documentation — configuration reference, framework guides (Express, Next.js, and upcoming adapters), log schema, API reference, and architecture — lives on the docs site:

docs.cipherunit.xyz

Contributing

Contributions are welcome.

  1. Check open issues before opening a new one
  2. Fork the repo and create a branch: git checkout -b feature/my-feature
  3. Follow Conventional Commits for commit messages
  4. Run pnpm run build before submitting
  5. Open a Pull Request

See the full contributing guide on the docs site for details.

License

BSD-3-Clause © Cipher Unit

Made with ❤️ for developers by CipherUnits