@zedtech/zedkit-nest

Keep request logs compact and silence chosen paths

Pass compact req/res serializers and a quiet-path log level through the bootstrap logger options.

alpha

At a glance

  • Who: API developers who want one line per request without headers, and to hush noisy success paths.
  • What: Pass compact req/res serializers and a quiet-path log level through the bootstrap logger options. An optional transformLine runs on each parsed object so the caller can scrub without the package depending on a scrubber.
  • Use when: When request logs must not carry headers or sockets, and health polls should stay silent on success.
  • Avoid when: When you need pino's full request serializer for debugging — omit serializers and customLogLevel.
  • See also: Ship request logs without leaking credentials, Bootstrap a Nest app

Install

pnpm add @zedtech/zedkit-nest

Latest: 1.1.0 (via changesets).

Example

Usage
import { compactRequestSerializers, createNestApp, createRequestLogLevel } from "@zedtech/zedkit-nest";
const app = await createNestApp({
  module: AppModule,
  logger: {
    serializers: compactRequestSerializers(),
    customLogLevel: createRequestLogLevel({ quietPaths: ["/health"] }),
  },
});

Wraps: pino-http

On this page