@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
Usage
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
transformLineruns 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
serializersandcustomLogLevel. - See also: Ship request logs without leaking credentials, Bootstrap a Nest app
Install
pnpm add @zedtech/zedkit-nestLatest: 1.1.0 (via changesets).
Example
import { compactRequestSerializers, createNestApp, createRequestLogLevel } from "@zedtech/zedkit-nest";
const app = await createNestApp({
module: AppModule,
logger: {
serializers: compactRequestSerializers(),
customLogLevel: createRequestLogLevel({ quietPaths: ["/health"] }),
},
});Wraps: pino-http